Package com.complexible.common.collect
Interface SkippingLongIterator
-
- All Superinterfaces:
java.lang.AutoCloseable
,CloseableLongIterator
,LongIterator
,PeekingLongIterator
- All Known Implementing Classes:
AbstractSkippingLongIterator
,TransformingLongIterator
public interface SkippingLongIterator extends PeekingLongIterator, CloseableLongIterator
Iterator for primitive longs that allows skipping.- Since:
- 0.7.1
- Author:
- Evren Sirin
-
-
Field Summary
Fields Modifier and Type Field Description static long
NOT_FOUND
Special constant equivalent toLong.MIN_VALUE
used to indicate thatskipTo(long)
function skipped further then the end of the iterator.-
Fields inherited from interface com.complexible.common.primitives.LongIterator
NO_NEXT_ELEMENT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
void
reset()
Resets the iterator to the beginning.boolean
skipTo(long target)
Moves the position to the minimal value that is greater than or equal to the target.-
Methods inherited from interface com.complexible.common.primitives.LongIterator
hasNext, next
-
Methods inherited from interface com.complexible.common.collect.PeekingLongIterator
peek
-
-
-
-
Field Detail
-
NOT_FOUND
static final long NOT_FOUND
Special constant equivalent toLong.MIN_VALUE
used to indicate thatskipTo(long)
function skipped further then the end of the iterator.- See Also:
- Constant Field Values
-
-
Method Detail
-
skipTo
boolean skipTo(long target)
Moves the position to the minimal value that is greater than or equal to the target. Returns true, if such value exists, false otherwise.
-
reset
void reset()
Resets the iterator to the beginning.
-
close
default void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceCloseableLongIterator
-
-