Class IndexOnlyForIterator

  • All Implemented Interfaces:
    ForIterator

    public class IndexOnlyForIterator
    extends java.lang.Object
    implements ForIterator
    ForIterator implementation that only handles the index and not the actual iteration of elements.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int index  
      private int size  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean first()  
      void increment()  
      int index()  
      boolean last()  
      • Methods inherited from class java.lang.Object

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

      • index

        private int index
      • size

        private final int size
    • Constructor Detail

      • IndexOnlyForIterator

        public IndexOnlyForIterator​(int size)
    • Method Detail

      • increment

        public void increment()
      • last

        public boolean last()
        Specified by:
        last in interface ForIterator