Class JsonArrayImpl.JsonArrayIterator

  • All Implemented Interfaces:
    java.util.Iterator<javax.json.JsonValue>
    Enclosing class:
    JsonArrayImpl

    private class JsonArrayImpl.JsonArrayIterator
    extends java.lang.Object
    implements java.util.Iterator<javax.json.JsonValue>
    We don't need any range check, so we can simplify the Iterator logic. get() on an ArrayList works even faster than ArrayList#iterator!
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int cursor  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private JsonArrayIterator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      javax.json.JsonValue next()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, remove
    • Field Detail

      • cursor

        private int cursor
    • Constructor Detail

      • JsonArrayIterator

        private JsonArrayIterator()
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<javax.json.JsonValue>
      • next

        public javax.json.JsonValue next()
        Specified by:
        next in interface java.util.Iterator<javax.json.JsonValue>