Java BigDecimal Compare greaterThan(BigDecimal val, double threshold)

Here you can find the source of greaterThan(BigDecimal val, double threshold)

Description

greater Than

License

Open Source License

Declaration

public static boolean greaterThan(BigDecimal val, double threshold) 

Method Source Code


//package com.java2s;
import static java.util.Objects.requireNonNull;
import java.math.BigDecimal;

public class Main {

    public static boolean greaterThan(BigDecimal val, double threshold) {

        requireNonNull(val);
        return val.compareTo(BigDecimal.valueOf(threshold)) > 0;
    }/*from w  w w .jav a2  s  .  c  om*/

    public static boolean greaterThan(BigDecimal val, BigDecimal threshold) {

        requireNonNull(val);
        return val.compareTo(threshold) > 0;
    }
}

Related

  1. compareTo(final BigDecimal v1, final BigDecimal v2)
  2. compareToOne(BigDecimal x)
  3. compareToZeroOrNull(BigDecimal value)
  4. greaterThan(BigDecimal decimal, double number)
  5. GreaterThan(BigDecimal one, BigDecimal two)
  6. GreaterThanOrEqual(BigDecimal one, BigDecimal two)
  7. greaterThanZero(BigDecimal d)
  8. greaterThanZero(BigDecimal is)
  9. isGreater(BigDecimal a, BigDecimal b)