public class JsonArray extends Object implements IJsonArray
IJsonArray implementation.| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
JsonArray(IJsonManager jsonManager)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object element)
Adds an element at the end.
|
void |
addFirst(Object element)
Adds an element at the beginning.
|
void |
clear()
Clears all elements.
|
Object |
get(int pos)
Gets an element at the specified position.
|
BigDecimal |
getBigDecimal(int pos)
Gets an element as
BigDecimal. |
Boolean |
getBoolean(int pos)
Gets an element as
Boolean. |
Double |
getDouble(int pos)
Gets an element as
Double. |
protected LinkedList<Object> |
getElements() |
Integer |
getInteger(int pos)
Gets an element as
Integer. |
IJsonArray |
getJsonArray(int pos)
Gets an element as
IJsonArray. |
protected IJsonManager |
getJsonManager() |
IJsonObject |
getJsonObject(int pos)
Gets an element as
IJsonObject. |
Long |
getLong(int pos)
Gets an element as
Long. |
String |
getString(int pos)
Gets an element as
String. |
List<Object> |
getUnderlyingList()
The underlying list.
|
Iterator<Object> |
iterator() |
int |
size()
The array size.
|
String |
toJsonString()
The
Json string representation
of the array. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic JsonArray(IJsonManager jsonManager)
protected IJsonManager getJsonManager()
protected LinkedList<Object> getElements()
public List<Object> getUnderlyingList()
IJsonArraygetUnderlyingList in interface IJsonArraypublic void add(Object element)
IJsonArrayadd in interface IJsonArraypublic void addFirst(Object element)
IJsonArrayaddFirst in interface IJsonArraypublic void clear()
IJsonArrayclear in interface IJsonArraypublic int size()
IJsonArraysize in interface IJsonArraypublic Object get(int pos)
IJsonArrayget in interface IJsonArraynull if not found.public IJsonObject getJsonObject(int pos)
IJsonArrayIJsonObject.getJsonObject in interface IJsonArraynull if not found.public IJsonArray getJsonArray(int pos)
IJsonArrayIJsonArray.getJsonArray in interface IJsonArraynull if not found.public String getString(int pos)
IJsonArrayString.getString in interface IJsonArraynull if not found.public Integer getInteger(int pos)
IJsonArrayInteger.getInteger in interface IJsonArraynull if not found.public Long getLong(int pos)
IJsonArrayLong.getLong in interface IJsonArraynull if not found.public Double getDouble(int pos)
IJsonArrayDouble.getDouble in interface IJsonArraynull if not found.public Boolean getBoolean(int pos)
IJsonArrayBoolean.getBoolean in interface IJsonArraynull if not found.public BigDecimal getBigDecimal(int pos)
IJsonArrayBigDecimal.getBigDecimal in interface IJsonArraynull if not found.public String toJsonString()
IJsonArrayJson string representation
of the array.toJsonString in interface IJsonArrayCopyright © 2016. All rights reserved.