public VisualNode getOppositeNode(VisualNode node) { if (targetNode == node) { return sourceNode; } if (sourceNode == node) { return targetNode; } throw new IllegalArgumentException( "Node '" + node.getLabel() + "' is neither the source nor the target node of the edge '" + getLabel() + "'"); }
public String getLabel() { return sourceNode.getLabel() + " --> " + targetNode.getLabel(); }