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 JsonArray
append(Object value)
Stream<JsonArray>
arrayStream()
Streams the elements in the array after casting them toJsonArray
s.JsonArray
asArray(int index)
boolean
asBoolean(int index)
double
asDouble(int index)
float
asFloat(int index)
int
asInt(int index)
long
asLong(int index)
String
asString(int index)
List<Object>
backing()
Object
get(int index)
int
size()
Stream<Object>
stream()
Streams the elements in the array.
-
-
-
Method Detail
-
stream
public Stream<Object> stream()
Description copied from interface:JsonArray
Streams the elements in the array.
-
arrayStream
public Stream<JsonArray> arrayStream()
Description copied from interface:JsonArray
Streams the elements in the array after casting them toJsonArray
s.Useful for processing arrays of arrays.
- Specified by:
arrayStream
in interfaceJsonArray
- Returns:
- the stream
-
-