Class JGraphMedianHybridCrossingReduction.MedianCellSorter
java.lang.Object
com.jgraph.layout.hierarchical.JGraphMedianHybridCrossingReduction.MedianCellSorter
- All Implemented Interfaces:
Comparable
- Enclosing class:
JGraphMedianHybridCrossingReduction
protected class JGraphMedianHybridCrossingReduction.MedianCellSorter
extends Object
implements Comparable
A utility class used to track cells whilst sorting occurs on the median
values. Does not violate (x.compareTo(y)==0) == (x.equals(y))
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleThe median value of the cell storedbooleanWhether or not to flip equal median values. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
medianValue
public double medianValueThe median value of the cell stored -
nudge
public boolean nudgeWhether or not to flip equal median values.
-
-
Constructor Details
-
MedianCellSorter
protected MedianCellSorter()
-
-
Method Details
-
compareTo
comparator on the medianValue- Specified by:
compareToin interfaceComparable- Parameters:
arg0- the object to be compared to- Returns:
- the standard return you would expect when comparing two double
-