N - Node parameter typepublic abstract class AbstractGraph<N> extends AbstractBaseGraph<N> implements Graph<N>
Graph. It is recommended to extend this
class rather than implement Graph directly.| Constructor and Description |
|---|
AbstractGraph() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns
true iff object is a Graph that has the same elements and the
same structural relationships as those in this graph. |
int |
hashCode()
Returns the hash code for this graph.
|
java.lang.String |
toString()
Returns a string representation of this graph.
|
degree, edgeCount, edges, hasEdgeConnecting, hasEdgeConnecting, incidentEdgeOrder, incidentEdges, inDegree, isOrderingCompatible, outDegree, validateEndpointsclone, finalize, getClass, notify, notifyAll, wait, wait, waitadjacentNodes, allowsSelfLoops, degree, edges, hasEdgeConnecting, hasEdgeConnecting, incidentEdgeOrder, incidentEdges, inDegree, isDirected, nodeOrder, nodes, outDegree, predecessors, successorspublic final boolean equals(@CheckForNull
java.lang.Object obj)
Graphtrue iff object is a Graph that has the same elements and the
same structural relationships as those in this graph.
Thus, two graphs A and B are equal if all of the following are true:
directedness.
node sets.
edge sets.
Graph properties besides directedness do not affect equality.
For example, two graphs may be considered equal even if one allows self-loops and the other
doesn't. Additionally, the order in which nodes or edges are added to the graph, and the order
in which they are iterated over, are irrelevant.
A reference implementation of this is provided by equals(Object).
public final int hashCode()
GraphGraph.edges().
A reference implementation of this is provided by hashCode().
public java.lang.String toString()
toString in class java.lang.Object