Package org.geotools.ysld
Class YamlMap
- Object
-
- YamlObject<Map<String,Object>>
-
- YamlMap
-
-
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(String key)
Boolean access.Boolean
boolOr(String key, Boolean def)
Boolean access.Double
doub(String key)
Double access.Double
doubOr(String key, Double def)
Double access.static YamlMap
from(Object... pairs)
Quick inline map creation.Object
get(String key)
Value accessboolean
has(String key)
Check if mapping available for keyInteger
integer(String key)
Integer access.Integer
intOr(String key, Integer def)
Integer access.Iterator<String>
iterator()
Iterate over keys.String
key(int i)
Access key by index, order provided byiterator()
.YamlMap
map(String key)
Access value as a YamlMapYamlObject<?>
obj(String key)
Access value as a Yaml wrapper.YamlSeq
seq(String key)
Access value as a YamlSeqString
str(String key)
String access.String
strOr(String key, String def)
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
-
YamlMap
public YamlMap(Object obj)
Yaml mapping.- Parameters:
obj
- WrappedMap
- Throws:
IllegalArgumentException
-Map
is required
-
-
Method Detail
-
from
public static YamlMap from(Object... pairs)
Quick inline map creation.- Parameters:
pairs
- Key value pairs- Returns:
- Map of provided key value pairs.
-
strOr
public String strOr(String key, String def)
String access.- Parameters:
def
- default if value not provided- Returns:
- String access, converting if necessary.
-
integer
public Integer integer(String key)
Integer access.- Returns:
- Integer access, converting if necessary.
-
intOr
public Integer intOr(String key, Integer def)
Integer access.- Parameters:
def
- default if value not provided- Returns:
- Integer access, converting if necessary.
-
doub
public Double doub(String key)
Double access.- Returns:
- Integer access, converting if necessary.
-
doubOr
public Double doubOr(String key, Double def)
Double access.- Parameters:
def
- default if value not provided- Returns:
- Integer access, converting if necessary.
-
bool
public Boolean bool(String key)
Boolean access.- Returns:
- Boolean access, converting if necessary.
-
boolOr
public Boolean boolOr(String key, Boolean def)
Boolean access.- Parameters:
def
- default if value not provided- Returns:
- Boolean access, converting if necessary.
-
has
public boolean has(String key)
Check if mapping available for key- Returns:
- true if mapping available for key
-
obj
public YamlObject<?> obj(String key)
Access value as a Yaml wrapper.Wrappers are provided for Map and List
- Returns:
- Access as Yaml wrapper
-
key
public String key(int i)
Access key by index, order provided byiterator()
.- Parameters:
i
- index- Returns:
- key access by index
-
-