Package io.github.jbellis.jvector.graph
Class NodesIterator
java.lang.Object
io.github.jbellis.jvector.graph.NodesIterator
- All Implemented Interfaces:
Iterator<Integer>,PrimitiveIterator<Integer,,IntConsumer> PrimitiveIterator.OfInt
- Direct Known Subclasses:
NodesIterator.ArrayNodesIterator
Iterator over graph nodes that includes the size –- the total
number of nodes to be iterated over. The nodes are NOT guaranteed to be presented in any
particular order.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NodesIteratorfromPrimitiveIterator(PrimitiveIterator.OfInt iterator, int size) intsize()The number of elements in this iterator *Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.PrimitiveIterator.OfInt
forEachRemaining, forEachRemaining, next, nextInt
-
Field Details
-
size
protected final int size
-
-
Constructor Details
-
NodesIterator
public NodesIterator(int size) Constructor for iterator based on the size
-
-
Method Details
-
size
public int size()The number of elements in this iterator * -
fromPrimitiveIterator
-