java.lang.Object
org.shredzone.acme4j.toolbox.JSON.Array
- All Implemented Interfaces:
Iterable<JSON.Value>
- Enclosing class:
- JSON
Represents a JSON array.
-
Method Summary
Modifier and TypeMethodDescriptionget
(int index) Gets theJSON.Value
at the given index.boolean
isEmpty()
Returnstrue
if the array is empty.iterator()
Creates a newIterator
that iterates over the arrayJSON.Value
.int
size()
Returns the array size.stream()
Returns a stream of values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
size
Returns the array size.- Returns:
- Size of the array
-
isEmpty
Returnstrue
if the array is empty. -
get
Gets theJSON.Value
at the given index.- Parameters:
index
- Array index to read from- Returns:
JSON.Value
at this index
-
stream
Returns a stream of values.- Returns:
Stream
of allJSON.Value
of this array
-
iterator
Creates a newIterator
that iterates over the arrayJSON.Value
.- Specified by:
iterator
in interfaceIterable<JSON.Value>
-