Package dev.latvian.apps.json
Class JSONArray
- All Implemented Interfaces:
JSONSerializable,StructuredJSON,Serializable,Cloneable,Iterable<Object>,Collection<Object>,List<Object>,RandomAccess,SequencedCollection<Object>
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Method Summary
Modifier and TypeMethodDescriptionaddArray()asArray()asArray(int key) booleanasBoolean(int key) doubleasDouble(int key) doubleasDouble(int key, double def) intasInt(int key) intasInt(int key, int def) longasLong(int key) longasLong(int key, long def) asNumber(int key) asObject()asObject(int key) asString(int key) <T> List<T> cast()get(int index) static JSONArrayof()static JSONArraystatic JSONArraystatic JSONArrayofArrays()static JSONArrayofSize(int size) booleanremoveDeep(DeepRemovePredicate predicate, boolean removeEmpty) final ObjecttoJSON()toString()Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAllMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Method Details
-
of
-
ofSize
-
of
-
ofArray
-
ofAll
-
toJSON
- Specified by:
toJSONin interfaceJSONSerializable
-
asObject
- Specified by:
asObjectin interfaceStructuredJSON
-
asArray
- Specified by:
asArrayin interfaceStructuredJSON
-
cast
-
ofObjects
-
ofArrays
-
ofStrings
-
ofNumbers
-
ofBooleans
-
get
-
append
-
asObject
-
addObject
-
asArray
-
addArray
-
asString
-
asNumber
-
asNumber
-
asInt
public int asInt(int key, int def) -
asInt
public int asInt(int key) -
asLong
public long asLong(int key, long def) -
asLong
public long asLong(int key) -
asDouble
public double asDouble(int key, double def) -
asDouble
public double asDouble(int key) -
asBoolean
public boolean asBoolean(int key) -
toString
- Overrides:
toStringin classAbstractCollection<Object>
-
toPrettyString
-
removeDeep
-