Class PrimitiveLongCollections.PrimitiveLongBaseIterator
- java.lang.Object
-
- org.neo4j.gds.core.utils.collection.primitive.PrimitiveLongCollections.PrimitiveLongBaseIterator
-
- All Implemented Interfaces:
java.util.Iterator<java.lang.Long>,java.util.PrimitiveIterator<java.lang.Long,java.util.function.LongConsumer>,java.util.PrimitiveIterator.OfLong
- Direct Known Subclasses:
PrimitiveLongCollections.PrimitiveLongRangeIterator
- Enclosing class:
- PrimitiveLongCollections
public abstract static class PrimitiveLongCollections.PrimitiveLongBaseIterator extends java.lang.Object implements java.util.PrimitiveIterator.OfLongBase iterator for simpler implementations ofPrimitiveIterator.OfLongs.
-
-
Field Summary
Fields Modifier and Type Field Description protected longnext
-
Constructor Summary
Constructors Constructor Description PrimitiveLongBaseIterator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleanfetchNext()Fetches the next item in this iterator.booleanhasNext()protected booleannext(long nextItem)Called from inside an implementation offetchNext()if a next item was found.longnextLong()
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<java.lang.Long>
-
nextLong
public long nextLong()
- Specified by:
nextLongin interfacejava.util.PrimitiveIterator.OfLong
-
fetchNext
protected abstract boolean fetchNext()
Fetches the next item in this iterator. Returns whether or not a next item was found. If a next item was found, that value must have been set inside the implementation of this method usingnext(long).
-
next
protected boolean next(long nextItem)
Called from inside an implementation offetchNext()if a next item was found. This method returnstrueso that it can be used in short-hand conditionals (TODO what are they called?), like:protected boolean fetchNext() { return source.hasNext() ? next( source.next() ) : false; }- Parameters:
nextItem- the next item found.
-
-