Class SorterTool.HumanTreeComparator
- java.lang.Object
-
- com.nomagic.magicdraw.magicreport.tools.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 Summary
Fields Modifier and Type Field Description private java.util.Map<Element,java.util.Map<java.lang.Object,java.lang.Integer>>
elementIndexInOwnersContainmentMap
private java.util.Map<java.lang.String,java.lang.Integer>
mPriorityByType
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description HumanTreeComparator(SorterTool sorterTool)
Create ascending sort.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(java.lang.Object o1, java.lang.Object o2)
private int
compareByOwnersContainmentList(Element element, Element element1)
private java.util.Map<java.lang.Object,java.lang.Integer>
getElementIndexInOwnersContainmentMap(Element element)
private static java.util.Locale
getLocale()
private int
getTypePriority(java.lang.String type)
private static java.lang.String
getTypeSortKey(BaseElement element)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
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 interfacejava.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)
-
-