Package org.mapfish.print.wrapper
Interface PObject
- All Known Implementing Classes:
PAbstractObject
,PJsonObject
,PMultiObject
,PYamlObject
public interface PObject
Object wrapper interface for Json and Yaml parsing.
-
Method Summary
Modifier and TypeMethodDescriptionGet a property as a array or throw exception.boolean
Get a property as a boolean or throw exception.Gets the string representation of the path to the current element.double
Get a property as a double or throw an exception.float
Get a property as a float or throw an exception.int
Get a property as a int or throw an exception.long
Get a property as a long or throw an exception.Get a property as a object or throw exception.Gets the string representation of the path to the current element.Get a property as a string or throw an exception.boolean
Check if the object has a property with the key.boolean
Is the property an array.keys()
Get an iterator of all keys in this objects.Get the value for the key.Get a property as a array or null.Get a property as a array or default.Get a property as a boolean or null.Get a property as a boolean or default value.Get a property as a double or defaultValue.Get a property as a double or defaultValue.Get a property as a float or null.Get a property as a float or Default value.Get a property as a int or MIN_VALUE.Get a property as a int or default value.Get a property as a long or MIN_VALUE.long
Get a property as a long or default value.Get a property as a object or null.Get a property as a object or null.Get a property as a string or null.Get a property as a string or defaultValue.int
size()
Get the number of properties in this object.
-
Method Details
-
opt
Get the value for the key.- Parameters:
key
- the key identifying the value to obtain.
-
getString
Get a property as a string or throw an exception.- Parameters:
key
- the property name
-
optString
Get a property as a string or null.- Parameters:
key
- the property name
-
optString
Get a property as a string or defaultValue.- Parameters:
key
- the property namedefaultValue
- the default value
-
getInt
Get a property as a int or throw an exception.- Parameters:
key
- the property name
-
optInt
Get a property as a int or MIN_VALUE.- Parameters:
key
- the property name
-
optInt
Get a property as a int or default value.- Parameters:
key
- the property namedefaultValue
- the default value
-
getLong
Get a property as a long or throw an exception.- Parameters:
key
- the property name
-
optLong
Get a property as a long or MIN_VALUE.- Parameters:
key
- the property name
-
optLong
Get a property as a long or default value.- Parameters:
key
- the property namedefaultValue
- the default value
-
getDouble
Get a property as a double or throw an exception.- Parameters:
key
- the property name
-
optDouble
Get a property as a double or defaultValue.- Parameters:
key
- the property name
-
optDouble
Get a property as a double or defaultValue.- Parameters:
key
- the property namedefaultValue
- the default value
-
getFloat
Get a property as a float or throw an exception.- Parameters:
key
- the property name
-
optFloat
Get a property as a float or null.- Parameters:
key
- the property name
-
optFloat
Get a property as a float or Default value.- Parameters:
key
- the property namedefaultValue
- default value
-
getBool
Get a property as a boolean or throw exception.- Parameters:
key
- the property name
-
optBool
Get a property as a boolean or null.- Parameters:
key
- the property name
-
optBool
Get a property as a boolean or default value.- Parameters:
key
- the property namedefaultValue
- the default
-
getObject
Get a property as a object or throw exception.- Parameters:
key
- the property name
-
optObject
Get a property as a object or null.- Parameters:
key
- the property name
-
optObject
Get a property as a object or null.- Parameters:
key
- the property namedefaultValue
- default
-
getArray
Get a property as a array or throw exception.- Parameters:
key
- the property name
-
optArray
Get a property as a array or null.- Parameters:
key
- the property name
-
isArray
Is the property an array.- Parameters:
key
- the property name
-
optArray
Get a property as a array or default.- Parameters:
key
- the property namedefaultValue
- default
-
keys
Get an iterator of all keys in this objects.- Returns:
- The keys iterator
-
size
int size()Get the number of properties in this object. -
has
Check if the object has a property with the key.- Parameters:
key
- key to check for.
-
getPath
Gets the string representation of the path to the current element.- Parameters:
key
- the leaf key
-
getCurrentPath
String getCurrentPath()Gets the string representation of the path to the current element.
-