Package com.complexible.common.collect
Class TransformingLongIterator<T>
java.lang.Object
com.complexible.common.collect.TransformingLongIterator<T>
- All Implemented Interfaces:
PeekingLongIterator,SkippingLongIterator,CloseableLongIterator,LongIterator,AutoCloseable
Transforms an object iterator to a long iterator.
- Since:
- 3.0.2
- Author:
- Evren Sirin
-
Field Summary
Fields inherited from interface com.complexible.common.primitives.LongIterator
NO_NEXT_ELEMENTFields inherited from interface com.complexible.common.collect.SkippingLongIterator
NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionTransformingLongIterator(SkippingIterator<T> theBaseIt, boolean theSkipValues) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected abstract longprotected abstract TgetSkipTarget(long theValue) booleanhasNext()longnext()longpeek()voidreset()Resets the iterator to the beginning.booleanskipTo(long theValue) Moves the position to the minimal value that is greater than or equal to the target.
-
Constructor Details
-
TransformingLongIterator
-
-
Method Details
-
getLong
-
getSkipTarget
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceLongIterator
-
next
public long next()- Specified by:
nextin interfaceLongIterator
-
peek
public long peek()- Specified by:
peekin interfacePeekingLongIterator
-
skipTo
public boolean skipTo(long theValue) Description copied from interface:SkippingLongIteratorMoves the position to the minimal value that is greater than or equal to the target. Returns true, if such value exists, false otherwise.- Specified by:
skipToin interfaceSkippingLongIterator
-
reset
public void reset()Description copied from interface:SkippingLongIteratorResets the iterator to the beginning.- Specified by:
resetin interfaceSkippingLongIterator
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseableLongIterator- Specified by:
closein interfaceSkippingLongIterator
-