Module org.jhotdraw8.graph
Package org.jhotdraw8.graph.iterator
Class BfsDfsIndexedVertexSpliterator
java.lang.Object
java.util.Spliterators.AbstractIntSpliterator
org.jhotdraw8.collection.enumerator.AbstractIntEnumerator
org.jhotdraw8.graph.iterator.BfsDfsIndexedVertexSpliterator
- All Implemented Interfaces:
Spliterator<Integer>,Spliterator.OfInt,Spliterator.OfPrimitive<Integer,,IntConsumer, Spliterator.OfInt> BareEnumerator<Integer>,Enumerator<Integer>,Enumerator.OfInt
Enumerates vertices in a graph with indexed vertices starting from a root vertex in
breadth-first-order or in depth-first-order.
- Author:
- Werner Randelshofer
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jhotdraw8.collection.enumerator.Enumerator
Enumerator.OfDouble, Enumerator.OfInt, Enumerator.OfLongNested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
Fields inherited from class org.jhotdraw8.collection.enumerator.AbstractIntEnumerator
currentFields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Constructor Summary
ConstructorsConstructorDescriptionBfsDfsIndexedVertexSpliterator(@NonNull Function<Integer, Enumerator.OfInt> nextFunction, int root, int vertexCount, boolean dfs) Creates a new instance.BfsDfsIndexedVertexSpliterator(@NonNull Function<Integer, Enumerator.OfInt> nextFunction, int root, @NonNull AddToIntSet visited, boolean dfs) Creates a new instance. -
Method Summary
Methods inherited from class org.jhotdraw8.collection.enumerator.AbstractIntEnumerator
currentAsIntMethods inherited from class java.util.Spliterators.AbstractIntSpliterator
characteristics, estimateSize, trySplitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.collection.enumerator.Enumerator.OfInt
current, tryAdvance, tryAdvanceMethods inherited from interface java.util.Spliterator
characteristics, estimateSize, getComparator, getExactSizeIfKnown, hasCharacteristicsMethods inherited from interface java.util.Spliterator.OfInt
forEachRemaining, forEachRemaining, tryAdvance, trySplit
-
Constructor Details
-
BfsDfsIndexedVertexSpliterator
public BfsDfsIndexedVertexSpliterator(@NonNull Function<Integer, Enumerator.OfInt> nextFunction, int root, int vertexCount, boolean dfs) Creates a new instance.- Parameters:
nextFunction- the nextFunctionroot- the root vertexvertexCount- the vertex countdfs- whether to perform depth-first-search instead of breadth-first-search
-
BfsDfsIndexedVertexSpliterator
public BfsDfsIndexedVertexSpliterator(@NonNull Function<Integer, Enumerator.OfInt> nextFunction, int root, @NonNull AddToIntSet visited, boolean dfs) Creates a new instance.- Parameters:
nextFunction- the nextFunctionroot- the root vertexdfs- whether to perform depth-first-search instead of breadth-first-search
-
-
Method Details
-
moveNext
public boolean moveNext()
-