|
|||||||||
| 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 SimpleEdge

java.lang.Objectcom.phoenixst.plexus.SimpleEdge
- All Implemented Interfaces:
- Graph.Edge, java.io.Serializable
- Direct Known Subclasses:
- SimpleObjectEdge
- public class SimpleEdge
- extends java.lang.Object
- implements Graph.Edge, java.io.Serializable
- extends java.lang.Object
A simple Edge implementation which contains no
user-defined object. Because of how equals( Object ) 55 is defined, instances of this class may only be
used by simple graphs.
- Since:
- 1.0
- Version:
- $Revision: 1.1 $
| Field Summary | |
private Graph |
graph
The graph which created this Edge. |
private java.lang.Object |
head
The head of this Edge. |
private boolean |
isDirected
Whether or not this Edge is directed. |
private java.lang.Object |
tail
The tail of this Edge. |
| Constructor Summary | |
SimpleEdge(Graph graph,
java.lang.Object tail,
java.lang.Object head,
boolean isDirected)
Creates a new SimpleEdge. |
|
| Method Summary | |
boolean |
equals(java.lang.Object object)
Two SimpleEdges are equal if they have the same
directedness, are from the exact same graph (using
==), and have equal endpoints. |
protected static boolean |
equals(java.lang.Object a,
java.lang.Object b)
|
boolean |
equals(SimpleEdge edge)
Two SimpleEdges are equal if they have the same
directedness, are from the exact same graph (using
==), and have equal endpoints. |
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. |
int |
hashCode()
Returns the hash code for 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, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
graph
private Graph graph
- The graph which created this
Edge.
tail
private java.lang.Object tail
- The tail of this
Edge.
head
private java.lang.Object head
- The head of this
Edge.
isDirected
private boolean isDirected
- Whether or not this
Edgeis directed.
| Constructor Detail |
SimpleEdge
public SimpleEdge(Graph graph, java.lang.Object tail, java.lang.Object head, boolean isDirected)
- Creates a new
SimpleEdge.
| 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)
equals
public boolean equals(java.lang.Object object)
- Two
SimpleEdgesare equal if they have the same directedness, are from the exact same graph (using==), and have equal endpoints.- Specified by:
equalsin interfaceGraph.Edge
equals
public boolean equals(SimpleEdge edge)
- Two
SimpleEdgesare equal if they have the same directedness, are from the exact same graph (using==), and have equal endpoints.
hashCode
public int hashCode()
- Description copied from interface:
Graph.Edge - Returns the hash code for this
Edge. Since it is mutable, the contained user-defined object should not be used when computing the hash code.Description copied from class: java.lang.Object
null- Specified by:
hashCodein interfaceGraph.Edge
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.SimpleEdge