Package nxt.addons
Class JA
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList
nxt.addons.JA
- All Implemented Interfaces:
Iterable,Collection,List
Delegate json array operations to json simple and wrap it with convenience methods
This class does not really keep a list, but it implements a list in order to delegate iteration to the underlying JSONArray
in order to support streaming into String.
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
JA
public JA() -
JA
public JA(org.json.simple.JSONArray ja) -
JA
-
-
Method Details
-
toJSONArray
public org.json.simple.JSONArray toJSONArray() -
size
public int size()- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceList- Specified by:
sizein classAbstractCollection
-
iterator
- Specified by:
iteratorin interfaceCollection- Specified by:
iteratorin interfaceIterable- Specified by:
iteratorin interfaceList- Overrides:
iteratorin classAbstractList
-
values
-
objects
-
add
-
get
- Specified by:
getin interfaceList- Specified by:
getin classAbstractList
-
getObject
-
getString
-
getArray
-
setString
-
listIterator
Required by JSON#encodeArray()- Specified by:
listIteratorin interfaceList- Overrides:
listIteratorin classAbstractList- Returns:
- iterator
-
parse
-
parse
-
addAllJO
-