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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Determine if there is another element in this sequence.
      int next()
      Get the next element in the sequence.
      int peekNext()
      Observe the next element in the sequence without moving the iterator.
    • Method Detail

      • 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 java.util.NoSuchElementException
        Get the next element in the sequence.
        Returns:
        the next element
        Throws:
        java.util.NoSuchElementException - if there are no more elements
      • peekNext

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