Interface IntIterator

All Known Subinterfaces:
BiDirIntIterator
All Known Implementing Classes:
ByteIterator, CodePointIterator

public interface IntIterator
A primitive iterator, which can be used as the basis for string parsing, tokenizing, and other purposes.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determine if there is another element in this sequence.
    int
    Get the next element in the sequence.
    int
    Observe the next element in the sequence without moving the iterator.
  • Method Details

    • hasNext

      boolean hasNext()
      Determine if there is another element in this sequence.
      Returns:
      true if there is another element, false otherwise
    • next

      int next() throws NoSuchElementException
      Get the next element in the sequence.
      Returns:
      the next element
      Throws:
      NoSuchElementException - if there are no more elements
    • peekNext

      int peekNext() throws NoSuchElementException
      Observe the next element in the sequence without moving the iterator.
      Returns:
      the next element
      Throws:
      NoSuchElementException - if there are no more elements