Class Builder.ComparisonBuilder

java.lang.Object
com.landawn.abacus.util.Builder.ComparisonBuilder
Enclosing class:
Builder<T>

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

    • compare

      public <T extends Comparable<? super T>> Builder.ComparisonBuilder 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> Builder.ComparisonBuilder 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> Builder.ComparisonBuilder compare(T left, T right, BiFunction<? super T,? super T,Integer> func)
      Type Parameters:
      T -
      Parameters:
      left -
      right -
      func -
      Returns:
    • compareNullLess

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

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

      public Builder.ComparisonBuilder 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 Builder.ComparisonBuilder 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 Builder.ComparisonBuilder 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 Builder.ComparisonBuilder 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 Builder.ComparisonBuilder 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 Builder.ComparisonBuilder 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 Builder.ComparisonBuilder 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 Builder.ComparisonBuilder 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 Builder.ComparisonBuilder 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: