de.cau.cs.kieler.kiml.util
Class KimlUtil.PortComparator

java.lang.Object
  extended by de.cau.cs.kieler.kiml.util.KimlUtil.PortComparator
All Implemented Interfaces:
Serializable, Comparator<KPort>
Enclosing class:
KimlUtil

public static class KimlUtil.PortComparator
extends Object
implements Comparator<KPort>, Serializable

Comparator class used to sort ports according to their ranks.

See Also:
Serialized Form
Rating red

Constructor Summary
KimlUtil.PortComparator(boolean theforward, Direction thelayoutDirection)
          Creates a port comparator for the given setting.
 
Method Summary
 int compare(KPort port1, KPort port2)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

KimlUtil.PortComparator

public KimlUtil.PortComparator(boolean theforward,
                               Direction thelayoutDirection)
Creates a port comparator for the given setting.

Parameters:
theforward - indicates whether to treat ranks in forward direction
thelayoutDirection - horizontal or vertical layout direction
Method Detail

compare

public int compare(KPort port1,
                   KPort port2)

Specified by:
compare in interface Comparator<KPort>