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 class
If the graph is directed, each ordered [source, target] pair will be visited once if there is an edge connecting them.private static final class
If 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 boolean
advance()
Called aftersuccessorIterator
is exhausted.(package private) static <N> EndpointPairIterator
<N> Methods inherited from class com.google.common.collect.AbstractIterator
computeNext, endOfData, hasNext, next, peek
Methods inherited from class com.google.common.collect.UnmodifiableIterator
remove
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
graph
-
nodeIterator
-
node
-
successorIterator
-
-
Constructor Details
-
EndpointPairIterator
-
-
Method Details
-
of
-
advance
final boolean advance()Called aftersuccessorIterator
is exhausted. Advancesnode
to the next node and updatessuccessorIterator
to iterate through the successors ofnode
.
-