|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.math.graph_theory.DirectedGraph.Edge<N>
N
- the type of node.public static final class DirectedGraph.Edge<N>
This class is used to represent the unidirectional edges of a directed graph. An edge is directed from a source node to a sink node.
Constructor Summary | |
---|---|
DirectedGraph.Edge(T source,
S sink)
Constructs a new directed edge from the provided source and sink nodes. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Indicates if the provided object is equal to this directed edge. |
N |
getSink()
Returns the sink node of this directed edge. |
N |
getSource()
Returns the source node of this directed edge. |
int |
hashCode()
Returns a content-based hash code for this directed edge. |
boolean |
hasNode(java.lang.Object node)
Indicates if the provided object is a node of this directed edge. |
java.lang.String |
toString()
Returns an appropriate string representation of this edge. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DirectedGraph.Edge(T source, S sink)
T
- a type that extends N.S
- a type that extends N.source
- the source node.sink
- the sink node.Method Detail |
---|
public N getSource()
public N getSink()
public boolean hasNode(java.lang.Object node)
node
- the potential node.
true
if the provided object equals the source or
sink node; false
otherwise.public boolean equals(java.lang.Object o)
Edge
, 2)
its source node is the same as this edge's, and
3) its sink node is the same as this edge's.
equals
in class java.lang.Object
o
- the reference object with which to compare.
true
if this object is equal to the
provided object; false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |