Class ArrayIterable.MyIterator<E>

    • Constructor Summary

      Constructors 
      Constructor Description
      MyIterator​(E[] array, int startIndex, int endIndex, boolean isReversed)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      boolean isReversed()  
      E 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

      • array

        private final E[] array
      • startIndex

        private final int startIndex
      • endIndex

        private final int endIndex
      • isReversed

        private final boolean isReversed
      • index

        private int index
    • Constructor Detail

      • MyIterator

        public MyIterator​(E[] array,
                          int startIndex,
                          int endIndex,
                          boolean isReversed)
    • Method Detail

      • hasNext

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

        public E next()
        Specified by:
        next in interface java.util.Iterator<E>