Plexus v0.13.1

com.phoenixst.plexus.examples
Class AbstractIntegerNodeGraph.EdgeImpl

java.lang.Object
  extended by com.phoenixst.plexus.examples.AbstractIntegerNodeGraph.EdgeImpl
All Implemented Interfaces:
Graph.Edge, Serializable
Enclosing class:
AbstractIntegerNodeGraph

protected static class AbstractIntegerNodeGraph.EdgeImpl
extends Object
implements Graph.Edge, Serializable

Protected Graph.Edge implementation.

See Also:
Serialized Form

Constructor Summary
protected AbstractIntegerNodeGraph.EdgeImpl(int tail, int head, boolean directed)
           
 
Method Summary
 boolean equals(Object object)
          Returns whether or not some other object is equal to this one.
 Object getHead()
          Returns the node which is the head of this Graph.Edge.
 Object getOtherEndpoint(Object node)
          Returns the node which is at the other end of this Graph.Edge than the specified node.
 Object getTail()
          Returns the node which is the tail of this Graph.Edge.
 Object getUserObject()
          Returns the user object contained in this Graph.Edge.
 int hashCode()
          Returns the hash code for this Graph.Edge.
 boolean isDirected()
          Returns whether or not this Graph.Edge is directed.
 void setUserObject(Object object)
          Sets the user object contained in this Graph.Edge.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractIntegerNodeGraph.EdgeImpl

protected AbstractIntegerNodeGraph.EdgeImpl(int tail,
                                            int head,
                                            boolean directed)
Method Detail

isDirected

public boolean isDirected()
Description copied from interface: Graph.Edge
Returns whether or not this Graph.Edge is directed.

Specified by:
isDirected in interface Graph.Edge
Returns:
whether or not this Graph.Edge is directed.

getUserObject

public Object getUserObject()
Description copied from interface: Graph.Edge
Returns the user object contained in this Graph.Edge.

Specified by:
getUserObject in interface Graph.Edge
Returns:
the user object contained in this Graph.Edge.

setUserObject

public void setUserObject(Object object)
Description copied from interface: Graph.Edge
Sets the user object contained in this Graph.Edge.

Specified by:
setUserObject in interface Graph.Edge
Parameters:
object - the user object to replace the one in this Graph.Edge.

getTail

public Object getTail()
Description copied from interface: Graph.Edge
Returns the node which is the tail of this Graph.Edge.

Specified by:
getTail in interface Graph.Edge
Returns:
the node which is the tail of this Graph.Edge.

getHead

public Object getHead()
Description copied from interface: Graph.Edge
Returns the node which is the head of this Graph.Edge.

Specified by:
getHead in interface Graph.Edge
Returns:
the node which is the head of this Graph.Edge.

getOtherEndpoint

public Object getOtherEndpoint(Object node)
Description copied from interface: Graph.Edge
Returns the node which is at the other end of this Graph.Edge than the specified node.

Specified by:
getOtherEndpoint in interface Graph.Edge
Parameters:
node - the node which is the endpoint of this Graph.Edge not to return.
Returns:
the node which is at the other end of this Graph.Edge than the specified node.

equals

public boolean equals(Object object)
Description copied from interface: Graph.Edge
Returns whether or not some other object is equal to this one. It is vitally important that two Graph.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

Specified by:
equals in interface Graph.Edge
Overrides:
equals in class Object

hashCode

public int hashCode()
Description copied from interface: Graph.Edge
Returns the hash code for this Graph.Edge. Since it is mutable, the contained user-defined object should not be used when computing the hash code.

Description copied from class: Object

Specified by:
hashCode in interface Graph.Edge
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

Plexus v0.13.1

See 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.