Package org.wildfly.common.iteration
Interface BiDirIntIterator
-
- All Superinterfaces:
IntIterator
- All Known Implementing Classes:
ByteIterator,CodePointIterator
public interface BiDirIntIterator extends IntIterator
A bi-directional primitive iterator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasNext()Determine if there is another element in this sequence.booleanhasPrevious()Determine if there is a previous element in this sequence.intnext()Get the next element in the sequence.intpeekNext()Observe the next element in the sequence without moving the iterator.intpeekPrevious()Observe the previous element in the sequence without moving the iterator.intprevious()Get the previous element in the sequence.
-
-
-
Method Detail
-
hasNext
boolean hasNext()
Description copied from interface:IntIteratorDetermine if there is another element in this sequence.- Specified by:
hasNextin interfaceIntIterator- Returns:
trueif there is another element,falseotherwise
-
next
int next() throws java.util.NoSuchElementException
Description copied from interface:IntIteratorGet the next element in the sequence.- Specified by:
nextin interfaceIntIterator- Returns:
- the next element
- Throws:
java.util.NoSuchElementException- if there are no more elements
-
peekNext
int peekNext() throws java.util.NoSuchElementExceptionDescription copied from interface:IntIteratorObserve the next element in the sequence without moving the iterator.- Specified by:
peekNextin interfaceIntIterator- 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:
trueif there is a previous element,falseotherwise
-
previous
int previous() throws java.util.NoSuchElementExceptionGet 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.NoSuchElementExceptionObserve the previous element in the sequence without moving the iterator.- Returns:
- the previous element
- Throws:
java.util.NoSuchElementException- if there are no more elements
-
-