|
|||||||||
| Home >> All >> com >> phoenixst >> [ plexus overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.phoenixst.plexus
Class DefaultEdge

java.lang.Objectcom.phoenixst.plexus.DefaultEdge
- All Implemented Interfaces:
- Graph.Edge, java.io.Serializable
- Direct Known Subclasses:
- DefaultObjectEdge, DefaultSimpleEdge
- public class DefaultEdge
- extends java.lang.Object
- implements Graph.Edge, java.io.Serializable
- extends java.lang.Object
A default Graph.Edge implementation in which the
user-defined object must be null. The equals() 55 method is inherited from Object and uses
reference equality. This class should only be used by
Graphs which create edges once and store them.
- Since:
- 1.0
- Version:
- $Revision: 1.6 $
| Field Summary | |
protected java.lang.Object |
head
The head of this Edge. |
protected boolean |
isDirected
Whether or not this Edge is directed. |
protected java.lang.Object |
tail
The tail of this Edge. |
| Constructor Summary | |
DefaultEdge(java.lang.Object tail,
java.lang.Object head,
boolean isDirected)
Creates a new DefaultEdge. |
|
| Method Summary | |
protected static boolean |
equals(java.lang.Object a,
java.lang.Object b)
|
java.lang.Object |
getHead()
Returns the node which is the head of this Edge. |
java.lang.Object |
getOtherEndpoint(java.lang.Object node)
Returns the node which is at the other end of this Edge than the specified node. |
java.lang.Object |
getTail()
Returns the node which is the tail of this Edge. |
java.lang.Object |
getUserObject()
Returns the user object contained in this Edge. |
boolean |
isDirected()
Returns whether or not this Edge is directed. |
void |
setUserObject(java.lang.Object object)
Sets the user object contained in this Edge. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.phoenixst.plexus.Graph.Edge |
equals, hashCode |
| Field Detail |
tail
protected java.lang.Object tail
- The tail of this
Edge.
head
protected java.lang.Object head
- The head of this
Edge.
isDirected
protected boolean isDirected
- Whether or not this
Edgeis directed.
| Constructor Detail |
DefaultEdge
public DefaultEdge(java.lang.Object tail, java.lang.Object head, boolean isDirected)
- Creates a new
DefaultEdge.
| Method Detail |
isDirected
public boolean isDirected()
- Description copied from interface:
Graph.Edge - Returns whether or not this
Edgeis directed.- Specified by:
isDirectedin interfaceGraph.Edge
getUserObject
public java.lang.Object getUserObject()
- Description copied from interface:
Graph.Edge - Returns the user object contained in this
Edge.- Specified by:
getUserObjectin interfaceGraph.Edge
setUserObject
public void setUserObject(java.lang.Object object)
- Description copied from interface:
Graph.Edge - Sets the user object contained in this
Edge.- Specified by:
setUserObjectin interfaceGraph.Edge
getTail
public java.lang.Object getTail()
- Description copied from interface:
Graph.Edge - Returns the node which is the tail of this
Edge.- Specified by:
getTailin interfaceGraph.Edge
getHead
public java.lang.Object getHead()
- Description copied from interface:
Graph.Edge - Returns the node which is the head of this
Edge.- Specified by:
getHeadin interfaceGraph.Edge
getOtherEndpoint
public java.lang.Object getOtherEndpoint(java.lang.Object node)
- Description copied from interface:
Graph.Edge - Returns the node which is at the other end of this
Edgethan the specified node.- Specified by:
getOtherEndpointin interfaceGraph.Edge
equals
protected static final boolean equals(java.lang.Object a, java.lang.Object b)
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
|
|||||||||
| Home >> All >> com >> phoenixst >> [ plexus overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.phoenixst.plexus.DefaultEdge