public class PMultiObject extends PAbstractObject
| Constructor and Description |
|---|
PMultiObject(PObject[] objs)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getContext(PObject[] objs)
Build the context name.
|
boolean |
has(java.lang.String key)
Check if the object has a property with the key.
|
boolean |
isArray(java.lang.String key)
Is the property an array.
|
java.util.Iterator<java.lang.String> |
keys()
Get an iterator of all keys in this objects.
|
java.lang.Object |
opt(java.lang.String key)
Get the value for the key.
|
PArray |
optArray(java.lang.String key)
Get a property as a array or null.
|
java.lang.Boolean |
optBool(java.lang.String key)
Get a property as a boolean or null.
|
java.lang.Double |
optDouble(java.lang.String key)
Get a property as a double or defaultValue.
|
java.lang.Float |
optFloat(java.lang.String key)
Get a property as a float or null.
|
java.lang.Integer |
optInt(java.lang.String key)
Get a property as a int or MIN_VALUE.
|
java.lang.Long |
optLong(java.lang.String key)
Get a property as a long or MIN_VALUE.
|
PObject |
optObject(java.lang.String key)
Get a property as a object or null.
|
java.lang.String |
optString(java.lang.String key)
Get a property as a string or null.
|
int |
size()
Get the number of properties in this object.
|
getArray, getBool, getDouble, getFloat, getInt, getLong, getObject, getString, optArray, optBool, optDouble, optFloat, optInt, optLong, optObject, optStringaddPathTo, getContextName, getCurrentPath, getParent, getPathclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentPath, getPathpublic PMultiObject(PObject[] objs)
objs - the possible elementspublic static java.lang.String getContext(PObject[] objs)
objs - the objectspublic final java.lang.Object opt(java.lang.String key)
PObjectkey - the key identifying the value to obtain.public final java.lang.String optString(java.lang.String key)
PObjectkey - the property namepublic final java.lang.Integer optInt(java.lang.String key)
PObjectkey - the property namepublic final java.lang.Long optLong(java.lang.String key)
PObjectkey - the property namepublic final java.lang.Double optDouble(java.lang.String key)
PObjectkey - the property namepublic final java.lang.Float optFloat(java.lang.String key)
PObjectkey - the property namepublic final java.lang.Boolean optBool(java.lang.String key)
PObjectkey - the property namepublic final PObject optObject(java.lang.String key)
PObjectkey - the property namepublic final PArray optArray(java.lang.String key)
PObjectkey - the property namepublic final boolean isArray(java.lang.String key)
PObjectkey - the property namepublic final java.util.Iterator<java.lang.String> keys()
PObjectpublic final int size()
PObjectpublic final boolean has(java.lang.String key)
PObjectkey - key to check for.