Class KElement.SingleAttributeComparator

java.lang.Object
org.cip4.jdflib.core.KElement.SingleXPathComparator
org.cip4.jdflib.core.KElement.SingleAttributeComparator
All Implemented Interfaces:
Comparator<KElement>
Enclosing class:
KElement

public static class KElement.SingleAttributeComparator extends KElement.SingleXPathComparator
sorts according to the value of one attribute
if the attribute is numeric, compare numerically, else lexical comparison is done
  • Constructor Details

    • SingleAttributeComparator

      public SingleAttributeComparator(String pAttName, boolean pInvert)
      if the attribute is numeric, compare numerically, else lexical comparison is done
      Parameters:
      pAttName - the attribute to use for comparing
      pInvert - if true, sort backwards
    • SingleAttributeComparator

      public SingleAttributeComparator(String pAttName, boolean pInvert, boolean checkNumber, boolean caseSensitive)
  • Method Details