Package nxt.addons

Class JA

  • All Implemented Interfaces:
    java.lang.Iterable, java.util.Collection, java.util.List

    public class JA
    extends java.util.AbstractList
    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 
      Constructor Description
      JA()  
      JA​(java.lang.Object obj)  
      JA​(org.json.simple.JSONArray ja)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(JO jo)  
      boolean addAllJO​(java.util.Collection<JO> c)  
      JO get​(int i)  
      java.lang.Object getObject​(int i)  
      java.util.Iterator<JO> iterator()  
      java.util.ListIterator listIterator()
      Required by JSON#encodeArray()
      java.util.List<JO> objects()  
      static JA parse​(java.io.Reader r)  
      static JA parse​(java.lang.String s)  
      int size()  
      org.json.simple.JSONArray toJSONArray()  
      java.util.List<java.lang.String> values()  
      • Methods inherited from class java.util.AbstractList

        add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, remove, removeRange, set, subList
      • Methods inherited from class java.util.AbstractCollection

        addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
    • Constructor Detail

      • JA

        public JA()
      • JA

        public JA​(org.json.simple.JSONArray ja)
      • JA

        public JA​(java.lang.Object obj)
    • Method Detail

      • toJSONArray

        public org.json.simple.JSONArray toJSONArray()
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection
        Specified by:
        size in interface java.util.List
        Specified by:
        size in class java.util.AbstractCollection
      • iterator

        public java.util.Iterator<JO> iterator()
        Specified by:
        iterator in interface java.util.Collection
        Specified by:
        iterator in interface java.lang.Iterable
        Specified by:
        iterator in interface java.util.List
        Overrides:
        iterator in class java.util.AbstractList
      • values

        public java.util.List<java.lang.String> values()
      • objects

        public java.util.List<JO> objects()
      • add

        public boolean add​(JO jo)
      • get

        public JO get​(int i)
        Specified by:
        get in interface java.util.List
        Specified by:
        get in class java.util.AbstractList
      • getObject

        public java.lang.Object getObject​(int i)
      • listIterator

        public java.util.ListIterator listIterator()
        Required by JSON#encodeArray()
        Specified by:
        listIterator in interface java.util.List
        Overrides:
        listIterator in class java.util.AbstractList
        Returns:
        iterator
      • parse

        public static JA parse​(java.lang.String s)
      • parse

        public static JA parse​(java.io.Reader r)
      • addAllJO

        public boolean addAllJO​(java.util.Collection<JO> c)