Interface IntIterator


public interface IntIterator
An iterator for a list of ints.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks to see if the iterator has a next value.
    int
    Returns the next value in the iterator.
  • Method Details

    • hasNext

      boolean hasNext()
      Checks to see if the iterator has a next value.
      Returns:
      true if next() will succeed
    • next

      int next()
      Returns the next value in the iterator.
      Returns:
      next value
      Throws:
      NoSuchElementException - if no next element exists