Package org.wildfly.common.iteration
Interface IntIterator
-
- All Known Subinterfaces:
BiDirIntIterator
- All Known Implementing Classes:
ByteIterator,CodePointIterator
public interface IntIteratorA 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 booleanhasNext()Determine if there is another element in this sequence.intnext()Get the next element in the sequence.intpeekNext()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:
trueif there is another element,falseotherwise
-
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.NoSuchElementExceptionObserve the next element in the sequence without moving the iterator.- Returns:
- the next element
- Throws:
java.util.NoSuchElementException- if there are no more elements
-
-