Class IntArrayIterator

All Implemented Interfaces:
Iterator<Integer>, IIntIterator, IOpenIterator<Integer>

public class IntArrayIterator extends AIntIterator
Author:
snshor
  • Constructor Details

    • IntArrayIterator

      public IntArrayIterator(int[] ary)
  • Method Details

    • hasNext

      public boolean hasNext()
    • next

      public Integer next()
      Specified by:
      next in interface Iterator<Integer>
      Overrides:
      next in class AIntIterator
    • nextInt

      public int nextInt()
    • size

      public int size()
      Description copied from class: AOpenIterator
      Calculates the remaining size of iterated collection without destroying itself(const in c++ terminology), -1 if it cannot be known in advance. Not every iterator is capable of doing it.
      Specified by:
      size in interface IOpenIterator<Integer>
      Overrides:
      size in class AOpenIterator<Integer>
      Returns:
      the number of elements left to iterate, or UNKNOWN_SIZE if it is not known, this method is "const"
    • isResetable

      public boolean isResetable()
      Returns:
      true if iterator can be reset for repeated use
      See Also:
    • reset

      public void reset()
      Description copied from interface: IIntIterator
      resets iterator to it's initial state
      See Also: