Package com.mxgraph.layout
Class mxCompactTreeLayout.WeightedCellSorter
java.lang.Object
com.mxgraph.layout.mxCompactTreeLayout.WeightedCellSorter
- All Implemented Interfaces:
Comparable<Object>
- Enclosing class:
mxCompactTreeLayout
A utility class used to track cells whilst sorting occurs on the weighted
sum of their connected edges. Does not violate (x.compareTo(y)==0) ==
(x.equals(y))
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe cell whose median value is being calculatedboolean
Whether or not to flip equal weight values.boolean
Whether or not this cell has been visited in the current assignmentint
The weighted value of the cell stored -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
weightedValue
public int weightedValueThe weighted value of the cell stored -
nudge
public boolean nudgeWhether or not to flip equal weight values. -
visited
public boolean visitedWhether or not this cell has been visited in the current assignment -
cell
The cell whose median value is being calculated
-
-
Constructor Details
-
WeightedCellSorter
public WeightedCellSorter() -
WeightedCellSorter
-
-
Method Details
-
compareTo
comparator on the medianValue- Specified by:
compareTo
in interfaceComparable<Object>
- Parameters:
arg0
- the object to be compared to- Returns:
- the standard return you would expect when comparing two double
-