de.fhstralsund.vinets.structure
Interface Link

All Superinterfaces:
java.lang.Cloneable, NetElement, java.io.Serializable
All Known Subinterfaces:
Edge, HyperEdge
All Known Implementing Classes:
SimpleGraph.SimpleEdge

public interface Link
extends NetElement

The base interface for Edges and HyperEdges. Any class that implements Link should also implement one of these subinterfaces. Moreover, a class which implements this interface should not have any public constructor. Its instances should be created by a factory method of the corresponding Graph class.


Method Summary
 java.util.Iterator incidentNodes()
          Returns an iterator over the Nodes to which this Link is incident.
 boolean isDirected()
          Indicates whether this Link is a directed Edge.
 boolean isUndirected()
          Indicates whether this Link is an undirected Edge.
 
Methods inherited from interface de.fhstralsund.vinets.structure.NetElement
clearLabels, containsLabel, getBooleanLabel, getData, getDoubleLabel, getGeometry, getHost, getID, getIntLabel, getLabel, getLabelKeySet, getName, getOriginal, getRepresentation, removeLabel, setBooleanLabel, setData, setDoubleLabel, setGeometry, setIntLabel, setLabel, setName, setRepresentation
 

Method Detail

incidentNodes

java.util.Iterator incidentNodes()
Returns an iterator over the Nodes to which this Link is incident. Notice, that it is not specified, how this method should be implemented for HyperEdges, i.e. how to handle duplicate Nodes (An HyperEdge may be connected to one Node via more than one Port.) and whether the host of an HyperEdge should be delivered or not. (An HyperEdge may enter its own host from inside.)

Returns:
an iterator over the Nodes to which this Link is incident.

isDirected

boolean isDirected()
Indicates whether this Link is a directed Edge.

Returns:
true if the Link is a directed Edge with two endvertices.

isUndirected

boolean isUndirected()
Indicates whether this Link is an undirected Edge.

Returns:
true if the Link is an undirected edge with two endvertices.