Class KElement.SingleXPathComparator

    • Constructor Summary

      Constructors 
      Constructor Description
      SingleXPathComparator​(java.lang.String xPath, boolean pInvert)
      if the attribute is numeric, compare numerically, else lexical comparison is done
      SingleXPathComparator​(java.lang.String xPath, boolean pInvert, boolean checkNumber, boolean caseSensitive)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(KElement o1, KElement o2)  
      boolean isCaseSensitive()  
      boolean isCheckNumber()  
      void setCaseSensitive​(boolean caseSensitive)  
      void setCheckNumber​(boolean checkNumber)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • SingleXPathComparator

        public SingleXPathComparator​(java.lang.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
      • SingleXPathComparator

        public SingleXPathComparator​(java.lang.String xPath,
                                     boolean pInvert,
                                     boolean checkNumber,
                                     boolean caseSensitive)
    • Method Detail

      • compare

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

        public boolean isCheckNumber()
      • setCheckNumber

        public void setCheckNumber​(boolean checkNumber)
      • isCaseSensitive

        public boolean isCaseSensitive()
      • setCaseSensitive

        public void setCaseSensitive​(boolean caseSensitive)