Class IndexedIterator

  • All Implemented Interfaces:
    Iterator4
    Direct Known Subclasses:
    ArrayIterator4

    public abstract class IndexedIterator
    extends java.lang.Object
    implements Iterator4
    Basic functionality for implementing iterators for fixed length structures whose elements can be efficiently accessed by a numeric index.
    • Constructor Summary

      Constructors 
      Constructor Description
      IndexedIterator​(int length)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object current()  
      protected abstract java.lang.Object get​(int index)  
      boolean moveNext()  
      void reset()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IndexedIterator

        public IndexedIterator​(int length)
    • Method Detail

      • moveNext

        public boolean moveNext()
        Specified by:
        moveNext in interface Iterator4
      • current

        public java.lang.Object current()
        Specified by:
        current in interface Iterator4
      • reset

        public void reset()
        Specified by:
        reset in interface Iterator4
      • get

        protected abstract java.lang.Object get​(int index)