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

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

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

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