N
- The type of Node stored in this Edgepublic class DefaultDirectionalGraphEdge<N> extends DefaultGraphEdge<N> implements DirectionalEdge<N>
SINK, SOURCE, UNCONNECTED
Constructor and Description |
---|
DefaultDirectionalGraphEdge(N node1,
N node2)
Creates a new DefaultDirectionalGraphEdge which is connected to the given
Nodes.
|
Modifier and Type | Method and Description |
---|---|
DefaultDirectionalGraphEdge<N> |
createReplacementEdge(N gn1,
N gn2)
Creates a replacement DefaultDirectionalGraphEdge for this
DefaultDirectionalGraphEdge, with the replacement connected to the two
given Nodes.
|
int |
getNodeInterfaceType(N node)
Returns a bitmask indicating the interface type of the given Node with
respect to this DefaultDirectionalGraphEdge.
|
java.util.List<N> |
getSinkNodes()
Returns a List of the source Nodes of this DefaultDirectionalGraphEdge.
|
java.util.List<N> |
getSourceNodes()
Returns a List of the source Nodes of this DefaultDirectionalGraphEdge.
|
java.lang.String |
toString() |
getAdjacentNodeCount, getAdjacentNodes, getNodeAt, getOppositeNode, isAdjacentNode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAdjacentNodeCount, getAdjacentNodes, getNodeAt, isAdjacentNode
public DefaultDirectionalGraphEdge(N node1, N node2)
node1
- The first Node (the source) to which this
DefaultDirectionalGraphEdge is connectednode2
- The second Node (the sink) to which this
DefaultDirectionalGraphEdge is connectedpublic DefaultDirectionalGraphEdge<N> createReplacementEdge(N gn1, N gn2)
createReplacementEdge
in interface GraphEdge<N>
createReplacementEdge
in class DefaultGraphEdge<N>
gn1
- The first Node to be connected to the replacement GraphEdge.gn2
- The second Node to be connected to the replacement GraphEdge.GraphEdge.createReplacementEdge(java.lang.Object,
java.lang.Object)
public int getNodeInterfaceType(N node)
getNodeInterfaceType
in interface DirectionalEdge<N>
node
- The node for which the interface type should be returnedDirectionalEdge.getNodeInterfaceType(java.lang.Object)
public java.util.List<N> getSinkNodes()
getSinkNodes
in interface DirectionalEdge<N>
DirectionalEdge.getSourceNodes()
public java.util.List<N> getSourceNodes()
getSourceNodes
in interface DirectionalEdge<N>
DirectionalEdge.getSourceNodes()
public java.lang.String toString()
toString
in class java.lang.Object