Class ImmutableIntList.AbstractIndexedListIterator<E>

  • Type Parameters:
    E - element type
    All Implemented Interfaces:
    java.util.Iterator<E>, java.util.ListIterator<E>
    Enclosing class:

    private abstract static class ImmutableIntList.AbstractIndexedListIterator<E>
    Extension to UnmodifiableListIterator that operates by index.
    • Field Summary

      Modifier and Type Field Description
      private int position  
      private int size  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract E get​(int index)  
      boolean hasNext()  
      boolean hasPrevious()  
      E next()  
      int nextIndex()  
      E previous()  
      int previousIndex()  
      • Methods inherited from class

        add, set
      • Methods inherited from class

      • 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

      • Methods inherited from interface java.util.ListIterator

    • Field Detail

      • size

        private final int size
      • position

        private int position
    • Constructor Detail

      • AbstractIndexedListIterator

        protected AbstractIndexedListIterator​(int size,
                                              int position)
    • Method Detail

      • get

        protected abstract E get​(int index)
      • hasNext

        public final boolean hasNext()
      • next

        public final E next()
      • nextIndex

        public final int nextIndex()
      • hasPrevious

        public final boolean hasPrevious()
      • previous

        public final E previous()
      • previousIndex

        public final int previousIndex()