public class DefaultSimpleEdge extends DefaultEdge
Graph.Edge implementation
for a simple graph in which the user-defined object must be
null. This class should only be used by
Graphs which create edges lazily on demand.
Otherwise, use DefaultEdge or DefaultObjectEdge
instead. Reference equality is not used by
equals( Object ).| Constructor and Description |
|---|
DefaultSimpleEdge(Object tail,
Object head,
boolean directed)
Creates a new
DefaultSimpleEdge. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object)
Returns whether or not some other object is equal to this
one.
|
int |
hashCode()
Returns the hash code for this
Graph.Edge. |
getHead, getOtherEndpoint, getTail, getUserObject, isDirected, setUserObject, toStringpublic boolean equals(Object object)
Graph.EdgeGraph.Edges only be .equals()
when they refer to the same actual edge in the graph.
Which edge this is does not change when the contained
user-defined object changes. In a multigraph, the
endpoints and contained user-defined object are generally
not sufficiently distinguishing characteristics.
Accepting the default implementation from
Object, which uses reference equality, should
be preferred unless Graph.Edges are lazily
created on demand.
Description copied from class: Object
equals in interface Graph.Edgeequals in class Objectpublic int hashCode()
Graph.EdgeGraph.Edge.
Since it is mutable, the contained user-defined object
should not be used when computing the hash code.
Description copied from class: Object
hashCode in interface Graph.EdgehashCode in class ObjectSee the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.