Class JsonArrayImpl
java.lang.Object
org.apache.activemq.artemis.json.impl.JsonValueImpl
org.apache.activemq.artemis.json.impl.JsonArrayImpl
- All Implemented Interfaces:
Iterable<JsonValue>,Collection<JsonValue>,List<JsonValue>,JsonArray,JsonValue
-
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends JsonValue> c) booleanaddAll(Collection<? extends JsonValue> c) voidclear()booleanbooleancontainsAll(Collection<?> c) get(int index) booleangetBoolean(int index) Returns the native boolean value at the given position.booleangetBoolean(int index, boolean defaultValue) Returns the native boolean value at the given position or the defaultValue if null.intgetInt(int index) Returns the native int value at the given position.intgetInt(int index, int defaultValue) Returns the native int value at the given position or the defaultValue if null.getJsonArray(int index) Returns the JsonArray at the given position.getJsonNumber(int index) Returns the JsonNumber at the given position.getJsonObject(int index) Returns the JsonObject at the given position.getJsonString(int index) Returns the JsonString at the given position.javax.json.JsonArraygetString(int index) Returns the native String at the given position.Returns the native String at the given position or the defaultValue if null.getValuesAs(Class<T> clazz) Returns the respective JsonValue at the given position.intbooleanisEmpty()booleanisNull(int index) Returns whether the value at the given position isJsonValue.NULL.iterator()intlistIterator(int index) remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()subList(int fromIndex, int toIndex) 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, wrapMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface org.apache.activemq.artemis.json.JsonArray
getValuesAsMethods inherited from interface org.apache.activemq.artemis.json.JsonValue
asJsonArray, asJsonObject, getValueType, toStringMethods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Constructor Details
-
JsonArrayImpl
public JsonArrayImpl(javax.json.JsonArray rawArray)
-
-
Method Details
-
getRawArray
public javax.json.JsonArray getRawArray() -
getJsonObject
Description copied from interface:JsonArrayReturns the JsonObject at the given position.- Specified by:
getJsonObjectin interfaceJsonArray- Returns:
- the JsonObject at the given position
-
getJsonArray
Description copied from interface:JsonArrayReturns the JsonArray at the given position.- Specified by:
getJsonArrayin interfaceJsonArray- Returns:
- the JsonArray at the given position
-
getJsonNumber
Description copied from interface:JsonArrayReturns the JsonNumber at the given position.- Specified by:
getJsonNumberin interfaceJsonArray- Returns:
- the JsonNumber at the given position
-
getJsonString
Description copied from interface:JsonArrayReturns the JsonString at the given position.- Specified by:
getJsonStringin interfaceJsonArray- Returns:
- the JsonString at the given position
-
getValuesAs
Description copied from interface:JsonArrayReturns the respective JsonValue at the given position.- Specified by:
getValuesAsin interfaceJsonArray- Returns:
- the respective JsonValue at the given position
-
getString
Description copied from interface:JsonArrayReturns the native String at the given position. -
getString
Description copied from interface:JsonArrayReturns the native String at the given position or the defaultValue if null. -
getInt
public int getInt(int index) Description copied from interface:JsonArrayReturns the native int value at the given position. -
getInt
public int getInt(int index, int defaultValue) Description copied from interface:JsonArrayReturns the native int value at the given position or the defaultValue if null. -
getBoolean
public boolean getBoolean(int index) Description copied from interface:JsonArrayReturns the native boolean value at the given position.- Specified by:
getBooleanin interfaceJsonArray- Returns:
- the native boolean value at the given position
-
getBoolean
public boolean getBoolean(int index, boolean defaultValue) Description copied from interface:JsonArrayReturns the native boolean value at the given position or the defaultValue if null.- Specified by:
getBooleanin interfaceJsonArray- Returns:
- the native boolean value at the given position or the defaultValue if null
-
isNull
public boolean isNull(int index) Description copied from interface:JsonArrayReturns whether the value at the given position isJsonValue.NULL.- Specified by:
isNullin interfaceJsonArray- Returns:
- whether the value at the given position is
JsonValue.NULL
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<JsonValue>- Specified by:
containsAllin interfaceList<JsonValue>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<JsonValue>
-
listIterator
- Specified by:
listIteratorin interfaceList<JsonValue>
-
listIterator
- Specified by:
listIteratorin interfaceList<JsonValue>
-
subList
-