Interface BiDirIntIterator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Determine if there is another element in this sequence.
      boolean hasPrevious()
      Determine if there is a previous 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.
      int peekPrevious()
      Observe the previous element in the sequence without moving the iterator.
      int previous()
      Get the previous element in the sequence.
    • Method Detail

      • 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
      • hasPrevious

        boolean hasPrevious()
        Determine if there is a previous element in this sequence.
        Returns:
        true if there is a previous element, false otherwise
      • 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