Class ImmutableIntList.AbstractIndexedListIterator<E>

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

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

      Fields 
      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 com.google.common.collect.UnmodifiableListIterator

        add, set
      • Methods inherited from class com.google.common.collect.UnmodifiableIterator

        remove
      • 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
      • Methods inherited from interface java.util.ListIterator

        remove
    • 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()