Package org.mapfish.print.wrapper.json
Class PJsonArray
- java.lang.Object
-
- org.mapfish.print.wrapper.PElement
-
- org.mapfish.print.wrapper.json.PJsonArray
-
-
Constructor Summary
Constructors Constructor Description PJsonArray(PElement parent, org.json.JSONArray array, java.lang.String contextName)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get(int i)
Get the object at the given index.PArray
getArray(int i)
Get the element at the index as a json array.boolean
getBool(int i)
Get the element as a boolean.double
getDouble(int i)
Get the element at the index as a double.float
getFloat(int i)
Get the element at the index as a float.int
getInt(int i)
Get the element at the index as an integer.org.json.JSONArray
getInternalArray()
Get access to underlying array.PJsonArray
getJSONArray(int i)
Get the element at the index as a json array.PJsonObject
getJSONObject(int i)
Get the element at the index as a json object.long
getLong(int i)
Get the element at the index as a long.PObject
getObject(int i)
Get the element at the index as a json object.java.lang.String
getString(int i)
Get the element at the index as a string.int
size()
Return the size of the array.java.lang.String
toString()
-
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.PArray
getCurrentPath, getPath
-
-
-
-
Constructor Detail
-
PJsonArray
public PJsonArray(PElement parent, org.json.JSONArray array, java.lang.String contextName)
Constructor.- Parameters:
parent
- the parent object.array
- the array to wrapcontextName
- the name of this object within the parent.
-
-
Method Detail
-
getObject
public final PObject getObject(int i)
Get the element at the index as a json object.
-
getJSONObject
public final PJsonObject getJSONObject(int i)
Get the element at the index as a json object.- Parameters:
i
- the index of the object to access
-
getArray
public final PArray getArray(int i)
Get the element at the index as a json array.
-
getJSONArray
public final PJsonArray getJSONArray(int i)
Get the element at the index as a json array.- Parameters:
i
- the index of the element to access
-
getInt
public final int getInt(int i)
Get the element at the index as an integer.
-
getLong
public final long getLong(int i)
Description copied from interface:PArray
Get the element at the index as a long.
-
getFloat
public final float getFloat(int i)
Get the element at the index as a float.
-
getDouble
public final double getDouble(int i)
Get the element at the index as a double.
-
getString
public final java.lang.String getString(int i)
Get the element at the index as a string.
-
getInternalArray
public final org.json.JSONArray getInternalArray()
Get access to underlying array.
-
getBool
public final boolean getBool(int i)
Get the element as a boolean.
-
get
public final java.lang.Object get(int i)
Description copied from interface:PArray
Get the object at the given index.
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-