Class Chain.ComparisonChain

java.lang.Object
com.landawn.abacus.util.Chain.ComparisonChain
Enclosing class:
Chain

public static final class Chain.ComparisonChain extends Object
The Class ComparisonChain.
  • Method Details

    • compare

      public <T extends Comparable<? super T>> Chain.ComparisonChain compare(T left, T right)
      Compares two comparable objects as specified by Comparable.compareTo(T), if the result of this comparison chain has not already been determined.
      Type Parameters:
      T -
      Parameters:
      left -
      right -
      Returns:
      this
    • compare

      public <T> Chain.ComparisonChain compare(T left, T right, Comparator<T> comparator)
      Compares two objects using a comparator, if the result of this comparison chain has not already been determined.
      Type Parameters:
      T -
      Parameters:
      left -
      right -
      comparator -
      Returns:
      this
    • compare

      public <T, E extends Exception> Chain.ComparisonChain compare(T left, T right, Throwables.BiFunction<? super T,? super T,Integer,E> func) throws E
      Type Parameters:
      T -
      E -
      Parameters:
      left -
      right -
      func -
      Returns:
      Throws:
      E - the e
    • compareNullLess

      public <T extends Comparable<? super T>> Chain.ComparisonChain compareNullLess(T left, T right)
      null is smaller.
      Type Parameters:
      T -
      Parameters:
      left -
      right -
      Returns:
    • compareNullBigger

      public <T extends Comparable<? super T>> Chain.ComparisonChain compareNullBigger(T left, T right)
      null is bigger.
      Type Parameters:
      T -
      Parameters:
      left -
      right -
      Returns:
    • compareFalseLess

      public Chain.ComparisonChain compareFalseLess(boolean left, boolean right)
      Compares two boolean values, considering false to be less than true, if the result of this comparison chain has not already been determined.
      Parameters:
      left -
      right -
      Returns:
      this
    • compareTrueLess

      public Chain.ComparisonChain compareTrueLess(boolean left, boolean right)
      Compares two boolean values, considering true to be less than false, if the result of this comparison chain has not already been determined.
      Parameters:
      left -
      right -
      Returns:
      this
    • compare

      public Chain.ComparisonChain compare(char left, char right)
      Compares two char values as specified by CommonUtil.compare(boolean, boolean), if the result of this comparison chain has not already been determined.
      Parameters:
      left -
      right -
      Returns:
      this
    • compare

      public Chain.ComparisonChain compare(byte left, byte right)
      Compares two byte values as specified by CommonUtil.compare(boolean, boolean), if the result of this comparison chain has not already been determined.
      Parameters:
      left -
      right -
      Returns:
      this
    • compare

      public Chain.ComparisonChain compare(short left, short right)
      Compares two short values as specified by CommonUtil.compare(boolean, boolean), if the result of this comparison chain has not already been determined.
      Parameters:
      left -
      right -
      Returns:
      this
    • compare

      public Chain.ComparisonChain compare(int left, int right)
      Compares two int values as specified by CommonUtil.compare(boolean, boolean), if the result of this comparison chain has not already been determined.
      Parameters:
      left -
      right -
      Returns:
      this
    • compare

      public Chain.ComparisonChain compare(long left, long right)
      Compares two long values as specified by CommonUtil.compare(boolean, boolean), if the result of this comparison chain has not already been determined.
      Parameters:
      left -
      right -
      Returns:
      this
    • compare

      public Chain.ComparisonChain compare(float left, float right)
      Compares two float values as specified by Float.compare(float, float), if the result of this comparison chain has not already been determined.
      Parameters:
      left -
      right -
      Returns:
      this
    • compare

      public Chain.ComparisonChain compare(double left, double right)
      Compares two double values as specified by Double.compare(double, double), if the result of this comparison chain has not already been determined.
      Parameters:
      left -
      right -
      Returns:
      this
    • result

      public int result()
      Returns: