Class SorterTool.HumanTreeComparator

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Comparator<java.lang.Object>
    Enclosing class:
    SorterTool

    private static class SorterTool.HumanTreeComparator
    extends java.lang.Object
    Sort Collection in ascending
    • Field Detail

      • mPriorityByType

        private final java.util.Map<java.lang.String,​java.lang.Integer> mPriorityByType
      • elementIndexInOwnersContainmentMap

        private java.util.Map<Element,​java.util.Map<java.lang.Object,​java.lang.Integer>> elementIndexInOwnersContainmentMap
    • Constructor Detail

      • HumanTreeComparator

        public HumanTreeComparator​(SorterTool sorterTool)
        Create ascending sort.
        Parameters:
        sorterTool - the sort tool
    • Method Detail

      • compareByOwnersContainmentList

        private int compareByOwnersContainmentList​(Element element,
                                                   Element element1)
      • getElementIndexInOwnersContainmentMap

        private java.util.Map<java.lang.Object,​java.lang.Integer> getElementIndexInOwnersContainmentMap​(Element element)
      • compare

        public int compare​(java.lang.Object o1,
                           java.lang.Object o2)
        Specified by:
        compare in interface java.util.Comparator<java.lang.Object>
        See Also:
        Comparator.compare(java.lang.Object, java.lang.Object)
      • getTypePriority

        private int getTypePriority​(java.lang.String type)
      • getLocale

        private static java.util.Locale getLocale()
      • getTypeSortKey

        private static java.lang.String getTypeSortKey​(BaseElement element)