org.cip4.jdflib.core
Class KElement.SingleXPathComparator
java.lang.Object
org.cip4.jdflib.core.KElement.SingleXPathComparator
- All Implemented Interfaces:
- Comparator<KElement>
- Direct Known Subclasses:
- KElement.SingleAttributeComparator
- Enclosing class:
- KElement
public static class KElement.SingleXPathComparator
- extends Object
- implements Comparator<KElement>
sorts according to the value of one attribute
if the attribute is numeric, compare numerically, else lexical comparison is done
- Author:
- prosirai
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KElement.SingleXPathComparator
public KElement.SingleXPathComparator(String xPath,
boolean pInvert)
- if the attribute is numeric, compare numerically, else lexical comparison is done
- Parameters:
xPath - the xpath in the context of this element to use for comparing
pInvert - if true, sort backwards
compare
public int compare(KElement o1,
KElement o2)
- Specified by:
compare in interface Comparator<KElement>
- Parameters:
o1 - o2 -
- Returns:
- See Also:
Comparator.compare(java.lang.Object, java.lang.Object)
Copyright © 2013. All Rights Reserved.