Interface BiDirIntIterator

All Superinterfaces:
IntIterator
All Known Implementing Classes:
ByteIterator, CodePointIterator

public interface BiDirIntIterator extends IntIterator
A bi-directional primitive iterator.
  • Method Summary

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

    • hasNext

      boolean hasNext()
      Description copied from interface: IntIterator
      Determine if there is another element in this sequence.
      Specified by:
      hasNext in interface IntIterator
      Returns:
      true if there is another element, false otherwise
    • next

      int next() throws NoSuchElementException
      Description copied from interface: IntIterator
      Get the next element in the sequence.
      Specified by:
      next in interface IntIterator
      Returns:
      the next element
      Throws:
      NoSuchElementException - if there are no more elements
    • peekNext

      int peekNext() throws NoSuchElementException
      Description copied from interface: IntIterator
      Observe the next element in the sequence without moving the iterator.
      Specified by:
      peekNext in interface IntIterator
      Returns:
      the next element
      Throws:
      NoSuchElementException - if there are no more elements
    • hasPrevious

      boolean hasPrevious()
      Determine if there is a previous element in this sequence.
      Returns:
      true if there is a previous element, false otherwise
    • previous

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

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