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.Valueat the given index.booleanisEmpty()Returnstrueif the array is empty.iterator()Creates a newIteratorthat iterates over the arrayJSON.Value.intsize()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, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
size
Returns the array size.- Returns:
- Size of the array
-
isEmpty
Returnstrueif the array is empty. -
get
Gets theJSON.Valueat the given index.- Parameters:
index- Array index to read from- Returns:
JSON.Valueat this index
-
stream
Returns a stream of values.- Returns:
Streamof allJSON.Valueof this array
-
iterator
Creates a newIteratorthat iterates over the arrayJSON.Value.- Specified by:
iteratorin interfaceIterable<JSON.Value>
-