Package org.jdrupes.json
Class JsonArray.JsonArrayWrapper
- java.lang.Object
-
- org.jdrupes.json.JsonArray.JsonArrayWrapper
-
- All Implemented Interfaces:
JsonArray
- Enclosing interface:
- JsonArray
public static class JsonArray.JsonArrayWrapper extends Object implements JsonArray
Instances of this class are used as default representations for JSON arrays.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jdrupes.json.JsonArray
JsonArray.DefaultJsonArray, JsonArray.JsonArrayWrapper
-
-
Field Summary
-
Fields inherited from interface org.jdrupes.json.JsonArray
EMPTY_ARRAY
-
-
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()Objectget(int index)intsize()Stream<Object>stream()Streams the elements in the array.
-
-
-
Method Detail
-
stream
public Stream<Object> stream()
Description copied from interface:JsonArrayStreams the elements in the array.
-
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
-
-