private static final class EndpointPair.Ordered<N> extends EndpointPair<N>
| Modifier | Constructor and Description |
|---|---|
private |
Ordered(N source,
N target) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Two ordered
EndpointPairs are equal if their EndpointPair.source() and EndpointPair.target()
are equal. |
int |
hashCode()
The hashcode of an ordered
EndpointPair is equal to Objects.hashCode(source(),
target()). |
boolean |
isOrdered()
Returns
true if this EndpointPair is an ordered pair (i.e. |
N |
source()
If this
EndpointPair EndpointPair.isOrdered(), returns the node which is the source. |
N |
target()
If this
EndpointPair EndpointPair.isOrdered(), returns the node which is the target. |
java.lang.String |
toString() |
adjacentNode, iterator, nodeU, nodeV, of, of, ordered, unorderedpublic N source()
EndpointPairEndpointPair EndpointPair.isOrdered(), returns the node which is the source.source in class EndpointPair<N>public N target()
EndpointPairEndpointPair EndpointPair.isOrdered(), returns the node which is the target.target in class EndpointPair<N>public boolean isOrdered()
EndpointPairtrue if this EndpointPair is an ordered pair (i.e. represents the
endpoints of a directed edge).isOrdered in class EndpointPair<N>public boolean equals(@CheckForNull
java.lang.Object obj)
EndpointPairEndpointPairs are equal if their EndpointPair.source() and EndpointPair.target()
are equal. Two unordered EndpointPairs are equal if they contain the same nodes. An
ordered EndpointPair is never equal to an unordered EndpointPair.equals in class EndpointPair<N>public int hashCode()
EndpointPairEndpointPair is equal to Objects.hashCode(source(),
target()). The hashcode of an unordered EndpointPair is equal to nodeU().hashCode() + nodeV().hashCode().hashCode in class EndpointPair<N>public java.lang.String toString()
toString in class java.lang.Object