Package com.google.common.graph
Class EndpointPair.Unordered<N>
java.lang.Object
com.google.common.graph.EndpointPair<N>
com.google.common.graph.EndpointPair.Unordered<N>
- All Implemented Interfaces:
Iterable<N>
- Enclosing class:
- EndpointPair<N>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTwo orderedEndpointPairs are equal if theirEndpointPair.source()andEndpointPair.target()are equal.inthashCode()The hashcode of an orderedEndpointPairis equal toObjects.hashCode(source(), target()).booleanReturnstrueif thisEndpointPairis an ordered pair (i.e.source()If thisEndpointPairEndpointPair.isOrdered(), returns the node which is the source.target()If thisEndpointPairEndpointPair.isOrdered(), returns the node which is the target.toString()Methods inherited from class com.google.common.graph.EndpointPair
adjacentNode, iterator, nodeU, nodeV, of, of, ordered, unorderedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Unordered
-
-
Method Details
-
source
Description copied from class:EndpointPairIf thisEndpointPairEndpointPair.isOrdered(), returns the node which is the source.- Specified by:
sourcein classEndpointPair<N>
-
target
Description copied from class:EndpointPairIf thisEndpointPairEndpointPair.isOrdered(), returns the node which is the target.- Specified by:
targetin classEndpointPair<N>
-
isOrdered
public boolean isOrdered()Description copied from class:EndpointPairReturnstrueif thisEndpointPairis an ordered pair (i.e. represents the endpoints of a directed edge).- Specified by:
isOrderedin classEndpointPair<N>
-
equals
Description copied from class:EndpointPairTwo orderedEndpointPairs are equal if theirEndpointPair.source()andEndpointPair.target()are equal. Two unorderedEndpointPairs are equal if they contain the same nodes. An orderedEndpointPairis never equal to an unorderedEndpointPair.- Specified by:
equalsin classEndpointPair<N>
-
hashCode
public int hashCode()Description copied from class:EndpointPairThe hashcode of an orderedEndpointPairis equal toObjects.hashCode(source(), target()). The hashcode of an unorderedEndpointPairis equal tonodeU().hashCode() + nodeV().hashCode().- Specified by:
hashCodein classEndpointPair<N>
-
toString
-