Package org.jdrupes.json
Class JsonArray.DefaultJsonArray
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<Object>
-
- org.jdrupes.json.JsonArray.DefaultJsonArray
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Object>,Collection<Object>,List<Object>,RandomAccess,JsonArray
- Enclosing interface:
- JsonArray
public static class JsonArray.DefaultJsonArray extends ArrayList<Object> implements JsonArray
Instances of this class are used as default representations for JSON arrays.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jdrupes.json.JsonArray
JsonArray.DefaultJsonArray, JsonArray.JsonArrayWrapper
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
Fields inherited from interface org.jdrupes.json.JsonArray
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description DefaultJsonArray()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonArrayappend(Object value)Stream<JsonArray>arrayStream()Streams the elements in the array after casting them toJsonArrays.JsonArrayasArray(int index)booleanasBoolean(int index)doubleasDouble(int index)floatasFloat(int index)intasInt(int index)longasLong(int index)StringasString(int index)List<Object>backing()Stream<Object>stream()Streams the elements in the array.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, toArray
-
Methods inherited from interface java.util.List
containsAll
-
-
-
-
Constructor Detail
-
DefaultJsonArray
public DefaultJsonArray()
-
-
Method Detail
-
stream
public Stream<Object> stream()
Description copied from interface:JsonArrayStreams the elements in the array.- Specified by:
streamin interfaceCollection<Object>- Specified by:
streamin interfaceJsonArray- Returns:
- the stream
-
arrayStream
public Stream<JsonArray> arrayStream()
Description copied from interface:JsonArrayStreams the elements in the array after casting them toJsonArrays.Useful for processing arrays of arrays.
- Specified by:
arrayStreamin interfaceJsonArray- Returns:
- the stream
-
-