Package org.cip4.jdflib.core
Class KElement.MultiAttributeComparator
java.lang.Object
org.cip4.jdflib.core.KElement.SingleXPathComparator
org.cip4.jdflib.core.KElement.MultiAttributeComparator
- All Implemented Interfaces:
Comparator<KElement>
- Enclosing class:
- KElement
sorts according to the value of one attribute
if the attribute is numeric, compare numerically, else lexical comparison is done
if the attribute is numeric, compare numerically, else lexical comparison is done
-
Constructor Summary
ConstructorsConstructorDescriptionMultiAttributeComparator(List<String> pAttName, boolean pInvert) if the attribute is numeric, compare numerically, else lexical comparison is doneMultiAttributeComparator(List<String> pAttName, boolean pInvert, boolean checkNumber, boolean caseSensitive) -
Method Summary
Methods inherited from class org.cip4.jdflib.core.KElement.SingleXPathComparator
isCaseSensitive, isCheckNumber, setCaseSensitive, setCheckNumberMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
MultiAttributeComparator
if the attribute is numeric, compare numerically, else lexical comparison is done- Parameters:
pAttName- the attribute to use for comparingpInvert- if true, sort backwards
-
MultiAttributeComparator
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<KElement>- Overrides:
comparein classKElement.SingleXPathComparator- Parameters:
o1-o2-- Returns:
- See Also:
-