de.fhstralsund.vinets.structure
Class SimpleGraph.SimpleNode

java.lang.Object
  extended by de.fhstralsund.vinets.structure.DefaultNetElement
      extended by de.fhstralsund.vinets.structure.SimpleGraph.SimpleNode
All Implemented Interfaces:
NetElement, Node, java.io.Serializable, java.lang.Cloneable
Enclosing class:
SimpleGraph

protected class SimpleGraph.SimpleNode
extends DefaultNetElement
implements Node

The standard implementation of the Node interface, an atomar Node.

See Also:
Serialized Form

Field Summary
protected  java.util.Set edges
           
protected  java.util.Set inArcs
           
protected  java.util.Set outArcs
           
 
Fields inherited from class de.fhstralsund.vinets.structure.DefaultNetElement
host, labelMap, original
 
Constructor Summary
protected SimpleGraph.SimpleNode(java.lang.String name, java.lang.Object data)
          Creates a new SimpleNode that has this SimpleGraph as its host.
 
Method Summary
 java.lang.Object clone()
          Delivers only a copy of the NetElement, the clone is a Node without any incident Edges.
 int degree()
          Delivers the number of undirected edges incident to this Node.
 NodeType getNodeType()
          Delivers the Type of this Node.
 java.util.Iterator inArcs()
          Delivers an Iterator to traverse all incoming arcs of this Node.
 java.util.Set inArcsSet()
           
 java.util.Iterator incidentEdges()
          Delivers an Iterator to traverse all incident edges of this Node.
 java.util.Set incidentEdgesSet()
           
 int indegree()
          Delivers the number of incoming arcs of this Node.
 boolean isAtomar()
          Indicates whether this Node is atomar, i.e. does not contain any inner graph hierarchically.
 java.util.Iterator outArcs()
          Delivers an Iterator to traverse all outgoing arcs of this Node.
 java.util.Set outArcsSet()
           
 int outdegree()
          Delivers the number of outgoing arcs of this Node.
 java.util.Iterator undirectedEdges()
          Delivers an Iterator to traverse all undirected edges incident to this Node.
 java.util.Set undirectedEdgesSet()
           
 
Methods inherited from class de.fhstralsund.vinets.structure.DefaultNetElement
clearLabels, containsLabel, getBooleanLabel, getData, getDoubleLabel, getGeometry, getHost, getID, getIntLabel, getLabel, getLabelKeySet, getName, getOriginal, getRepresentation, removeLabel, setBooleanLabel, setData, setDoubleLabel, setGeometry, setIntLabel, setLabel, setName, setRepresentation, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 

Field Detail

inArcs

protected java.util.Set inArcs

outArcs

protected java.util.Set outArcs

edges

protected java.util.Set edges
Constructor Detail

SimpleGraph.SimpleNode

protected SimpleGraph.SimpleNode(java.lang.String name,
                                 java.lang.Object data)
Creates a new SimpleNode that has this SimpleGraph as its host.

Parameters:
name - a name used to identify this Node for the user
data - external data of any kind
Method Detail

isAtomar

public boolean isAtomar()
Description copied from interface: Node
Indicates whether this Node is atomar, i.e. does not contain any inner graph hierarchically.

Specified by:
isAtomar in interface Node
Returns:
true if the node does not contain an inner Graph.

outdegree

public int outdegree()
Description copied from interface: Node
Delivers the number of outgoing arcs of this Node.

Specified by:
outdegree in interface Node
Returns:
the number of outgoing Links of this Node.

indegree

public int indegree()
Description copied from interface: Node
Delivers the number of incoming arcs of this Node.

Specified by:
indegree in interface Node
Returns:
the number of incoming Links of this Node.

degree

public int degree()
Description copied from interface: Node
Delivers the number of undirected edges incident to this Node.

Specified by:
degree in interface Node
Returns:
the number of undirected Links incident to this Node.

inArcs

public java.util.Iterator inArcs()
Description copied from interface: Node
Delivers an Iterator to traverse all incoming arcs of this Node.

Specified by:
inArcs in interface Node
Returns:
an Iterator to traverse all incoming Links of this Node.

outArcs

public java.util.Iterator outArcs()
Description copied from interface: Node
Delivers an Iterator to traverse all outgoing arcs of this Node.

Specified by:
outArcs in interface Node
Returns:
an Iterator to traverse all outgoing Links of this Node.

undirectedEdges

public java.util.Iterator undirectedEdges()
Description copied from interface: Node
Delivers an Iterator to traverse all undirected edges incident to this Node.

Specified by:
undirectedEdges in interface Node
Returns:
an Iterator to traverse all undirected Links of this Node.

incidentEdges

public java.util.Iterator incidentEdges()
Description copied from interface: Node
Delivers an Iterator to traverse all incident edges of this Node. All Links are delivered - directed (incoming and outgoing) arcs and undirected edges.

Specified by:
incidentEdges in interface Node
Returns:
an Iterator to traverse all incident Links of this Node.

getNodeType

public NodeType getNodeType()
Description copied from interface: Node
Delivers the Type of this Node.

Specified by:
getNodeType in interface Node
Returns:
the Type of this Node

clone

public java.lang.Object clone()
Delivers only a copy of the NetElement, the clone is a Node without any incident Edges. The host is the same as in the original. The method is used internally while cloning a Graph.

Overrides:
clone in class DefaultNetElement
Returns:
a new DefaultNetElement instance equal to this one.

inArcsSet

public java.util.Set inArcsSet()

outArcsSet

public java.util.Set outArcsSet()

undirectedEdgesSet

public java.util.Set undirectedEdgesSet()

incidentEdgesSet

public java.util.Set incidentEdgesSet()