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
EndpointPair s 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, unordered
public N source()
EndpointPair
EndpointPair
EndpointPair.isOrdered()
, returns the node which is the source.source
in class EndpointPair<N>
public N target()
EndpointPair
EndpointPair
EndpointPair.isOrdered()
, returns the node which is the target.target
in class EndpointPair<N>
public boolean isOrdered()
EndpointPair
true
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)
EndpointPair
EndpointPair
s are equal if their EndpointPair.source()
and EndpointPair.target()
are equal. Two unordered EndpointPair
s 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()
EndpointPair
EndpointPair
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