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 booleanCheck if the object has a property with the key.final booleanIs the property an array.keys()Get an iterator of all keys in this objects.final ObjectGet the value for the key.final PArrayGet a property as a array or null.final BooleanGet a property as a boolean or null.final DoubleGet a property as a double or defaultValue.final FloatGet a property as a float or null.final IntegerGet a property as a int or MIN_VALUE.final LongGet a property as a long or MIN_VALUE.final PObjectGet a property as a object or null.final StringGet a property as a string or null.final intsize()Get the number of properties in this object.final PJsonObjecttoJSON()Convert this object to a json object.final StringtoString()Methods inherited from class org.mapfish.print.wrapper.PAbstractObject
getArray, getBool, getDouble, getFloat, getInt, getLong, getObject, getString, optArray, optBool, optDouble, optFloat, optInt, optLong, optObject, optStringMethods inherited from class org.mapfish.print.wrapper.PElement
addPathTo, getContextName, getCurrentPath, getParent, getPathMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:PObjectGet the value for the key.- Parameters:
key- the key identifying the value to obtain.
-
optString
Description copied from interface:PObjectGet a property as a string or null.- Parameters:
key- the property name
-
optInt
Description copied from interface:PObjectGet a property as a int or MIN_VALUE.- Parameters:
key- the property name
-
optLong
Description copied from interface:PObjectGet a property as a long or MIN_VALUE.- Parameters:
key- the property name
-
optDouble
Description copied from interface:PObjectGet a property as a double or defaultValue.- Parameters:
key- the property name
-
optFloat
Description copied from interface:PObjectGet a property as a float or null.- Parameters:
key- the property name
-
optBool
Description copied from interface:PObjectGet a property as a boolean or null.- Parameters:
key- the property name
-
optObject
Description copied from interface:PObjectGet a property as a object or null.- Parameters:
key- the property name
-
optArray
Description copied from interface:PObjectGet a property as a array or null.- Parameters:
key- the property name
-
isArray
Description copied from interface:PObjectIs the property an array.- Parameters:
key- the property name
-
keys
Description copied from interface:PObjectGet an iterator of all keys in this objects.- Returns:
- The keys iterator
-
size
public final int size()Description copied from interface:PObjectGet the number of properties in this object. -
has
Description copied from interface:PObjectCheck if the object has a property with the key.- Parameters:
key- key to check for.
-
toString
-
toJSON
Convert this object to a json object.
-