Package com.google.common.graph
Class EndpointPairIterator<N>
java.lang.Object
com.google.common.collect.UnmodifiableIterator<EndpointPair<N>>
com.google.common.collect.AbstractIterator<EndpointPair<N>>
com.google.common.graph.EndpointPairIterator<N>
- All Implemented Interfaces:
Iterator<EndpointPair<N>>
- Direct Known Subclasses:
EndpointPairIterator.Directed,EndpointPairIterator.Undirected
A class to facilitate the set returned by
Graph.edges().-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classIf the graph is directed, each ordered [source, target] pair will be visited once if there is an edge connecting them.private static final classIf the graph is undirected, each unordered [node, otherNode] pair (except self-loops) will be visited twice if there is an edge connecting them. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) final booleanadvance()Called aftersuccessorIteratoris exhausted.(package private) static <N> EndpointPairIterator<N> Methods inherited from class com.google.common.collect.AbstractIterator
computeNext, endOfData, hasNext, next, peekMethods inherited from class com.google.common.collect.UnmodifiableIterator
removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
graph
-
nodeIterator
-
node
-
successorIterator
-
-
Constructor Details
-
EndpointPairIterator
-
-
Method Details
-
of
-
advance
final boolean advance()Called aftersuccessorIteratoris exhausted. Advancesnodeto the next node and updatessuccessorIteratorto iterate through the successors ofnode.
-