Package org.mapfish.print.wrapper.yaml
Class PYamlObject
java.lang.Object
org.mapfish.print.wrapper.PElement
org.mapfish.print.wrapper.PAbstractObject
org.mapfish.print.wrapper.yaml.PYamlObject
- All Implemented Interfaces:
PObject
Object wrapper for Yaml parsing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Check if the object has a property with the key.final boolean
Is the property an array.keys()
Get an iterator of all keys in this objects.final Object
Get the value for the key.final PArray
Get a property as a array or null.final Boolean
Get a property as a boolean or null.final Double
Get a property as a double or defaultValue.final Float
Get a property as a float or null.final Integer
Get a property as a int or MIN_VALUE.final Long
Get a property as a long or MIN_VALUE.final PObject
Get a property as a object or null.final String
Get a property as a string or null.final int
size()
Get the number of properties in this object.final PJsonObject
toJSON()
Convert this object to a json object.final String
toString()
Methods inherited from class org.mapfish.print.wrapper.PAbstractObject
getArray, getBool, getDouble, getFloat, getInt, getLong, getObject, getString, optArray, optBool, optDouble, optFloat, optInt, optLong, optObject, optString
Methods inherited from class org.mapfish.print.wrapper.PElement
addPathTo, getContextName, getCurrentPath, getParent, getPath
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.mapfish.print.wrapper.PObject
getCurrentPath, getPath
-
Constructor Details
-
PYamlObject
Constructor.- Parameters:
obj
- the internal json elementcontextName
- the field name of this element in the parent.
-
PYamlObject
Constructor.- Parameters:
parent
- the parent elementobj
- the internal json elementcontextName
- the field name of this element in the parent.
-
-
Method Details
-
opt
Description copied from interface:PObject
Get the value for the key.- Parameters:
key
- the key identifying the value to obtain.
-
optString
Description copied from interface:PObject
Get a property as a string or null.- Parameters:
key
- the property name
-
optInt
Description copied from interface:PObject
Get a property as a int or MIN_VALUE.- Parameters:
key
- the property name
-
optLong
Description copied from interface:PObject
Get a property as a long or MIN_VALUE.- Parameters:
key
- the property name
-
optDouble
Description copied from interface:PObject
Get a property as a double or defaultValue.- Parameters:
key
- the property name
-
optFloat
Description copied from interface:PObject
Get a property as a float or null.- Parameters:
key
- the property name
-
optBool
Description copied from interface:PObject
Get a property as a boolean or null.- Parameters:
key
- the property name
-
optObject
Description copied from interface:PObject
Get a property as a object or null.- Parameters:
key
- the property name
-
optArray
Description copied from interface:PObject
Get a property as a array or null.- Parameters:
key
- the property name
-
isArray
Description copied from interface:PObject
Is the property an array.- Parameters:
key
- the property name
-
keys
Description copied from interface:PObject
Get an iterator of all keys in this objects.- Returns:
- The keys iterator
-
size
public final int size()Description copied from interface:PObject
Get the number of properties in this object. -
has
Description copied from interface:PObject
Check if the object has a property with the key.- Parameters:
key
- key to check for.
-
toString
-
toJSON
Convert this object to a json object.
-