de.cau.cs.kieler.klodd.hierarchical.structures.slimgraph
Class KSlimNode

java.lang.Object
  extended by de.cau.cs.kieler.klodd.hierarchical.structures.slimgraph.KSlimGraphElement
      extended by de.cau.cs.kieler.klodd.hierarchical.structures.slimgraph.KSlimNode
All Implemented Interfaces:
Comparable<KSlimGraphElement>

public class KSlimNode
extends KSlimGraphElement

A node in the slim graph structure.

Rating proposed yellow
(2009-12-11) msp

Nested Class Summary
static class KSlimNode.IncEntry
          Single entry of a incidence list.
static class KSlimNode.Side
          Definition of sides of a node.
 
Constructor Summary
KSlimNode(KSlimGraph graph)
          Creates a node containing no object.
KSlimNode(KSlimGraph graph, Object obj)
          Creates a node containing the given object.
 
Method Summary
 List<KSlimNode.IncEntry> getIncidence()
          Returns the incidence.
 ListIterator<KSlimNode.IncEntry> getIterator(KSlimEdge edge, boolean outgoing)
          Gets a list iterator for this node's incidence list, with the current position at the given edge.
 float getXpos()
          Returns the xpos.
 float getYpos()
          Returns the ypos.
 void setXpos(float thexpos)
          Sets the xpos.
 void setYpos(float theypos)
          Sets the ypos.
 
Methods inherited from class de.cau.cs.kieler.klodd.hierarchical.structures.slimgraph.KSlimGraphElement
compareTo, equals, getId, getObject, getRank, hashCode, setId, setObject, setRank, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KSlimNode

public KSlimNode(KSlimGraph graph,
                 Object obj)
Creates a node containing the given object.

Parameters:
graph - the graph to which the new node shall be added
obj - the object to be contained

KSlimNode

public KSlimNode(KSlimGraph graph)
Creates a node containing no object.

Parameters:
graph - the graph to which the new node shall be added
Method Detail

getIterator

public ListIterator<KSlimNode.IncEntry> getIterator(KSlimEdge edge,
                                                    boolean outgoing)
Gets a list iterator for this node's incidence list, with the current position at the given edge. The returned list iterator has its cursor directly after the edge

Parameters:
edge - edge at which the iterator shall point
outgoing - is the given edge an outgoing edge?
Returns:
iterator pointing at edge, or null if the edge was not found

getIncidence

public List<KSlimNode.IncEntry> getIncidence()
Returns the incidence.

Returns:
the incidence

setXpos

public void setXpos(float thexpos)
Sets the xpos.

Parameters:
thexpos - the xpos to set

getXpos

public float getXpos()
Returns the xpos.

Returns:
the xpos

setYpos

public void setYpos(float theypos)
Sets the ypos.

Parameters:
theypos - the ypos to set

getYpos

public float getYpos()
Returns the ypos.

Returns:
the ypos