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
List
as 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 Boolean
bool(int i)
Boolean accessDouble
doub(int i)
Double accessstatic YamlSeq
from(Object... values)
Quick inline sequence creation.Object
get(int i)
Value accessInteger
integer(int i)
Integer accessIterator<YamlObject<Object>>
iterator()
Iterator access, requires all contents be wrapped asYamlObject
.YamlMap
map(int i)
Map accessYamlObject<?>
obj(int i)
Yaml wrapper accessYamlSeq
seq(int i)
YamlSeq accessString
str(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
-List
is 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
YamlMap
wrapper
-
seq
public YamlSeq seq(int i)
YamlSeq access- Parameters:
i
- index- Returns:
- Sequence access, provided as
YamlSeq
wrapper
-
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:
iterator
in interfaceIterable<YamlObject<Object>>
- Returns:
YamlObject
iterator access
-
-