Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.phoenixst.plexus
Class GraphWrapper.EdgeWrapper  view GraphWrapper.EdgeWrapper download GraphWrapper.EdgeWrapper.java

java.lang.Object
  extended bycom.phoenixst.plexus.GraphWrapper.EdgeWrapper
All Implemented Interfaces:
Graph.Edge, java.io.Serializable
Direct Known Subclasses:
GraphUtils.SynchronizedGraphWrapper.SynchronizedEdgeWrapper, GraphUtils.UnmodifiableGraphWrapper.UnmodifiableEdgeWrapper
Enclosing class:
GraphWrapper

protected class GraphWrapper.EdgeWrapper
extends java.lang.Object
implements Graph.Edge, java.io.Serializable

Edge wrapper.


Field Summary
protected  Graph.Edge edge
           
 
Constructor Summary
protected GraphWrapper.EdgeWrapper(Graph.Edge edge)
           
 
Method Summary
 boolean equals(GraphWrapper.EdgeWrapper edgeWrapper)
           
 boolean equals(java.lang.Object object)
          Returns whether or not some other object is equal to this one.
 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.
protected  boolean isFromGraph(Graph g)
           
 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

edge

protected Graph.Edge edge
Constructor Detail

GraphWrapper.EdgeWrapper

protected GraphWrapper.EdgeWrapper(Graph.Edge edge)
Method Detail

isFromGraph

protected boolean isFromGraph(Graph g)

isDirected

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

Specified by:
isDirected in interface Graph.Edge

getUserObject

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

Specified by:
getUserObject in interface Graph.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:
setUserObject in interface Graph.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:
getTail in interface Graph.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:
getHead in interface Graph.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 Edge than the specified node.

Specified by:
getOtherEndpoint in interface Graph.Edge

equals

public boolean equals(java.lang.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 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 Edges are lazily created on demand.

Description copied from class: java.lang.Object
null

Specified by:
equals in interface Graph.Edge

equals

public boolean equals(GraphWrapper.EdgeWrapper edgeWrapper)

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:
hashCode in interface Graph.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()).