Class JsonArrayImpl
- java.lang.Object
-
- org.apache.activemq.artemis.json.impl.JsonValueImpl
-
- org.apache.activemq.artemis.json.impl.JsonArrayImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.activemq.artemis.json.JsonValue
JsonValue.ValueType
-
-
Field Summary
-
Fields inherited from interface org.apache.activemq.artemis.json.JsonValue
EMPTY_JSON_ARRAY, EMPTY_JSON_OBJECT, FALSE, NULL, TRUE
-
-
Constructor Summary
Constructors Constructor Description JsonArrayImpl(javax.json.JsonArray rawArray)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, JsonValue element)booleanadd(JsonValue jsonValue)booleanaddAll(int index, java.util.Collection<? extends JsonValue> c)booleanaddAll(java.util.Collection<? extends JsonValue> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)JsonValueget(int index)booleangetBoolean(int index)booleangetBoolean(int index, boolean defaultValue)intgetInt(int index)intgetInt(int index, int defaultValue)JsonArraygetJsonArray(int index)JsonNumbergetJsonNumber(int index)JsonObjectgetJsonObject(int index)JsonStringgetJsonString(int index)javax.json.JsonArraygetRawArray()java.lang.StringgetString(int index)java.lang.StringgetString(int index, java.lang.String defaultValue)<T extends JsonValue>
java.util.List<T>getValuesAs(java.lang.Class<T> clazz)intindexOf(java.lang.Object o)booleanisEmpty()booleanisNull(int index)java.util.Iterator<JsonValue>iterator()intlastIndexOf(java.lang.Object o)java.util.ListIterator<JsonValue>listIterator()java.util.ListIterator<JsonValue>listIterator(int index)JsonValueremove(int index)booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)JsonValueset(int index, JsonValue element)intsize()java.util.List<JsonValue>subList(int fromIndex, int toIndex)java.lang.Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class org.apache.activemq.artemis.json.impl.JsonValueImpl
asJsonArray, asJsonObject, equals, getRawValue, getValueType, hashCode, toString, wrap
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.json.JsonArray
getValuesAs
-
Methods inherited from interface org.apache.activemq.artemis.json.JsonValue
asJsonArray, asJsonObject, getValueType, toString
-
-
-
-
Method Detail
-
getRawArray
public javax.json.JsonArray getRawArray()
-
getJsonObject
public JsonObject getJsonObject(int index)
- Specified by:
getJsonObjectin interfaceJsonArray- Returns:
- the JsonObject at the given position
-
getJsonArray
public JsonArray getJsonArray(int index)
- Specified by:
getJsonArrayin interfaceJsonArray- Returns:
- the JsonArray at the given position
-
getJsonNumber
public JsonNumber getJsonNumber(int index)
- Specified by:
getJsonNumberin interfaceJsonArray- Returns:
- the JsonNumber at the given position
-
getJsonString
public JsonString getJsonString(int index)
- Specified by:
getJsonStringin interfaceJsonArray- Returns:
- the JsonString at the given position
-
getValuesAs
public <T extends JsonValue> java.util.List<T> getValuesAs(java.lang.Class<T> clazz)
- Specified by:
getValuesAsin interfaceJsonArray- Returns:
- the respective JsonValue at the given position
-
getString
public java.lang.String getString(int index)
-
getString
public java.lang.String getString(int index, java.lang.String defaultValue)
-
getInt
public int getInt(int index)
-
getInt
public int getInt(int index, int defaultValue)
-
getBoolean
public boolean getBoolean(int index)
- Specified by:
getBooleanin interfaceJsonArray- Returns:
- the native boolean value at the given position
-
getBoolean
public boolean getBoolean(int index, boolean defaultValue)- Specified by:
getBooleanin interfaceJsonArray- Returns:
- the native boolean value at the given position or the defaultValue if null
-
isNull
public boolean isNull(int index)
- Specified by:
isNullin interfaceJsonArray- Returns:
- whether the value at the given position is
JsonValue.NULL.
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(java.lang.Object o)
-
iterator
public java.util.Iterator<JsonValue> iterator()
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(JsonValue jsonValue)
-
remove
public boolean remove(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
addAll
public boolean addAll(java.util.Collection<? extends JsonValue> c)
-
addAll
public boolean addAll(int index, java.util.Collection<? extends JsonValue> c)- Specified by:
addAllin interfacejava.util.List<JsonValue>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
clear
public void clear()
-
set
public JsonValue set(int index, JsonValue element)
- Specified by:
setin interfacejava.util.List<JsonValue>
-
add
public void add(int index, JsonValue element)- Specified by:
addin interfacejava.util.List<JsonValue>
-
remove
public JsonValue remove(int index)
- Specified by:
removein interfacejava.util.List<JsonValue>
-
indexOf
public int indexOf(java.lang.Object o)
- Specified by:
indexOfin interfacejava.util.List<JsonValue>
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
- Specified by:
lastIndexOfin interfacejava.util.List<JsonValue>
-
listIterator
public java.util.ListIterator<JsonValue> listIterator()
- Specified by:
listIteratorin interfacejava.util.List<JsonValue>
-
listIterator
public java.util.ListIterator<JsonValue> listIterator(int index)
- Specified by:
listIteratorin interfacejava.util.List<JsonValue>
-
-