Package org.geotools.ysld
Class YamlObject<T>
Object
YamlObject<T>
Base class for Yaml object wrappers.
Yaml is represented as atomic types (literals, expressions) and YamlObjects (for wrapping lists and maps). The
factory method create(Object)
will sort out the details. These YamlObjects are used to stage data when
parsing a Yaml document.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <C> C
Converts an object to the specified class.static <W> YamlObject<W>
create
(W raw) Convert raw object to Yaml wrapper.Raw value access via path.map()
Casts this object to aYamlMap
.raw()
Returns the raw object.seq()
Casts this object to aYamlSeq
.toString()
Yaml representation.
-
Field Details
-
raw
underlying raw object
-
-
Constructor Details
-
YamlObject
-
-
Method Details
-
create
Convert raw object to Yaml wrapper.- Returns:
- Yaml object wrapper, or null if the provided raw object is null.
-
map
Casts this object to aYamlMap
. -
seq
Casts this object to aYamlSeq
. -
lookup
Raw value access via path.Indended for quick value lookup during test cases.
- raw("1"): first value in a sequence
- raw("x"): value for "x" in a map
- raw("rules/2/symbolizers/3"): third symbolizer in second rule
- Returns:
- raw value, or null if not available
-
raw
Returns the raw object. -
lookupY
Seelookup(java.lang.String)
. Ensures that the result is wrapped as a YamlObject if it is a map, list, or array. -
convert
Converts an object to the specified class. -
toString
Yaml representation.
-