de.cau.cs.kieler.klay.layered.p4nodes
Class LinearSegmentsNodePlacer.LinearSegment

java.lang.Object
  extended by de.cau.cs.kieler.klay.layered.p4nodes.LinearSegmentsNodePlacer.LinearSegment
All Implemented Interfaces:
Comparable<LinearSegmentsNodePlacer.LinearSegment>
Enclosing class:
LinearSegmentsNodePlacer

public static class LinearSegmentsNodePlacer.LinearSegment
extends Object
implements Comparable<LinearSegmentsNodePlacer.LinearSegment>

A linear segment contains a single regular node or all dummy nodes of a long edge.

Rating red

Constructor Summary
LinearSegmentsNodePlacer.LinearSegment()
           
 
Method Summary
 int compareTo(LinearSegmentsNodePlacer.LinearSegment other)
          
 List<LNode> getNodes()
           
 LinearSegmentsNodePlacer.LinearSegment split(LNode node, int newId)
          Splits this linear segment before the given node.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinearSegmentsNodePlacer.LinearSegment

public LinearSegmentsNodePlacer.LinearSegment()
Method Detail

getNodes

public List<LNode> getNodes()
Returns:
the nodes

split

public LinearSegmentsNodePlacer.LinearSegment split(LNode node,
                                                    int newId)
Splits this linear segment before the given node. The returned segment contains all nodes from the given node onward, with their ID set to the new segment's ID. Those nodes are removed from this segment.

Parameters:
node - the node to split the segment at.
newId - the new segment's id.
Returns:
new linear segment with ID -1 and all nodes from node onward.

toString

public String toString()

Overrides:
toString in class Object

compareTo

public int compareTo(LinearSegmentsNodePlacer.LinearSegment other)

Specified by:
compareTo in interface Comparable<LinearSegmentsNodePlacer.LinearSegment>