Class mxCompactTreeLayout.WeightedCellSorter

  • All Implemented Interfaces:
    java.lang.Comparable<java.lang.Object>
    Enclosing class:
    mxCompactTreeLayout

    protected class mxCompactTreeLayout.WeightedCellSorter
    extends java.lang.Object
    implements java.lang.Comparable<java.lang.Object>
    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 Detail

      • weightedValue

        public int weightedValue
        The weighted value of the cell stored
      • nudge

        public boolean nudge
        Whether or not to flip equal weight values.
      • visited

        public boolean visited
        Whether or not this cell has been visited in the current assignment
    • Constructor Detail

      • WeightedCellSorter

        public WeightedCellSorter()
    • Method Detail

      • compareTo

        public int compareTo​(java.lang.Object arg0)
        comparator on the medianValue
        Specified by:
        compareTo in interface java.lang.Comparable<java.lang.Object>
        Parameters:
        arg0 - the object to be compared to
        Returns:
        the standard return you would expect when comparing two double