public interface Edge extends Element
complexity
tag.Modifier and Type | Method and Description |
---|---|
Node |
getNode0()
First node of the edge.
|
Node |
getNode1()
Second node of the edge.
|
Node |
getOpposite(Node node)
When knowing one node and one edge of this node, this method return the node
at the other end of the edge.
|
Node |
getSourceNode()
Start node.
|
Node |
getTargetNode()
End node.
|
boolean |
isDirected()
Is the edge directed ?.
|
boolean |
isLoop()
Does the source and target of this edge identify the same node ?.
|
attributeKeys, clearAttributes, getArray, getAttribute, getAttribute, getAttributeCount, getFirstAttributeOf, getFirstAttributeOf, getId, getIndex, getLabel, getMap, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasLabel, hasMap, hasNumber, hasVector, removeAttribute, setAttribute, setAttributes
boolean isDirected()
boolean isLoop()
Node getNode0()
This is equivalent to the getSourceNode()
method, but may be clearer
in the source code if the graph you are using is not directed.
getNode1()
,
getSourceNode()
Node getNode1()
This is equivalent to the getTargetNode()
method, but may be clearer
in the source code if the graph you are using is not directed.
getNode0()
,
getTargetNode()
Node getSourceNode()
When the edge is directed this is the source node, in this case you can get
the opposite node using getTargetNode()
. This is equivalent to the
getNode0()
method but may be clearer in the source code if the graph
you are using is directed.
getNode0()
,
getTargetNode()
Node getTargetNode()
When the edge is directed this is the target node, in this case you can get
the opposite node using getSourceNode()
. This is equivalent to the
getNode1()
method but may be clearer in the source code if the graph
you are using is directed.
getNode1()
,
getSourceNode()
Node getOpposite(Node node)
Return null if the given node is not at any end of the edge.
node
- The node we search the opposite of.