Package org.geotools.ysld
Class YamlSeq
- Object
-
- YamlObject<List<Object>>
-
- YamlSeq
-
- All Implemented Interfaces:
Iterable<YamlObject<Object>>
public class YamlSeq extends YamlObject<List<Object>> implements Iterable<YamlObject<Object>>
Wrapper around a parsed Yaml sequence.Wrapper requires
Listas sequence order is required.
-
-
Field Summary
-
Fields inherited from class YamlObject
raw
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Booleanbool(int i)Boolean accessDoubledoub(int i)Double accessstatic YamlSeqfrom(Object... values)Quick inline sequence creation.Objectget(int i)Value accessIntegerinteger(int i)Integer accessIterator<YamlObject<Object>>iterator()Iterator access, requires all contents be wrapped asYamlObject.YamlMapmap(int i)Map accessYamlObject<?>obj(int i)Yaml wrapper accessYamlSeqseq(int i)YamlSeq accessStringstr(int i)String access-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
YamlSeq
public YamlSeq(Object obj)
Yaml mapping.- Parameters:
obj- WrappedList- Throws:
IllegalArgumentException-Listis required
-
-
Method Detail
-
from
public static YamlSeq from(Object... values)
Quick inline sequence creation.- Returns:
- sequence of provided values.
-
str
public String str(int i)
String access- Parameters:
i- index- Returns:
- String access, converting as needed
-
integer
public Integer integer(int i)
Integer access- Parameters:
i- index- Returns:
- Integer access, converting as needed
-
doub
public Double doub(int i)
Double access- Parameters:
i- index- Returns:
- Double access, converting as needed
-
bool
public Boolean bool(int i)
Boolean access- Parameters:
i- index- Returns:
- Boolean access, converting as needed
-
get
public Object get(int i)
Value access- Parameters:
i- index- Returns:
- Value access
-
obj
public YamlObject<?> obj(int i)
Yaml wrapper accessWrappers are provided for Map and List
- Parameters:
i- index- Returns:
- Access as Yaml wrapper
-
map
public YamlMap map(int i)
Map access- Parameters:
i- index- Returns:
- Map access, provided as
YamlMapwrapper
-
seq
public YamlSeq seq(int i)
YamlSeq access- Parameters:
i- index- Returns:
- Sequence access, provided as
YamlSeqwrapper
-
iterator
public Iterator<YamlObject<Object>> iterator()
Iterator access, requires all contents be wrapped asYamlObject.To traverse a list of atomic values use
YamlObject.raw()iterator().- Specified by:
iteratorin interfaceIterable<YamlObject<Object>>- Returns:
YamlObjectiterator access
-
-