Class DomGraphChartLayout.FragmentOutDegreeComparator
java.lang.Object
de.saar.chorus.domgraph.layout.chartlayout.DomGraphChartLayout.FragmentOutDegreeComparator
- All Implemented Interfaces:
Comparator<String>
- Enclosing class:
- DomGraphChartLayout
public class DomGraphChartLayout.FragmentOutDegreeComparator
extends Object
implements Comparator<String>
Comparator sorting a collection of fragments ascending
according to their number of outgoing edges. One-Hole fragments count
as having fewer outgoing edges when if the actual number is equal.
- Author:
- Michaela Regneri
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
FragmentOutDegreeComparator
public FragmentOutDegreeComparator()
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<String>- Returns:
- 1 if the first fragment has more outgoing edges, 0 if the number of outgoing edges is equal, -1 otherwise
-