public final class Edge extends GraphElement
The edge class does not contain a public constructor; edges are created
with the Graph.addEdge(de.uni_due.inf.ti.graph.Label, de.uni_due.inf.ti.graph.Node...)
method.
Modifier and Type | Method and Description |
---|---|
int |
getArity()
Returns the arity of this edge.
|
static java.util.Set<Node> |
getBorder(java.util.Collection<Edge> edges)
Returns the border of a collection of edges.
|
Label |
getLabel()
Returns the label of this edge.
|
java.util.List<Node> |
getNodes()
Returns the list of incident nodes of this edge.
|
Node |
getSource()
Returns the source node of this binary edge.
|
Node |
getTarget()
Returns the target node of this binary edge.
|
boolean |
isBinary()
Returns whether this is a binary edge.
|
java.lang.String |
toString() |
getGraph
getAttribute, setAttribute
public Label getLabel()
public java.util.List<Node> getNodes()
public Node getSource()
java.lang.UnsupportedOperationException
- if this edge is not binarypublic Node getTarget()
java.lang.UnsupportedOperationException
- if this edge is not binarypublic int getArity()
public boolean isBinary()
public java.lang.String toString()
toString
in class java.lang.Object
public static java.util.Set<Node> getBorder(java.util.Collection<Edge> edges)
edges
- collection of edges of which the border is to be determinededges
java.lang.NullPointerException
- if edges
is null