Java BigDecimal Value Check isNegative(BigDecimal amount)

Here you can find the source of isNegative(BigDecimal amount)

Description

is Negative

License

Open Source License

Declaration

public static Boolean isNegative(BigDecimal amount) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.math.BigDecimal;

public class Main {
    public static Boolean isNegative(BigDecimal amount) {
        return null != amount && BigDecimal.ZERO.compareTo(amount) == 1;
    }//ww w . java 2  s  .co m

    public static int compareTo(Object value1, Object value2) {
        return new BigDecimal(String.valueOf(value1)).compareTo(new BigDecimal(String.valueOf(value2)));
    }
}

Related

  1. isLong(BigDecimal inValue)
  2. isLongNumber(BigDecimal minCar)
  3. isLowerThanOne(@Nonnull final BigDecimal aValue)
  4. isMaximumDecimalValue(BigDecimal maxValue)
  5. isMoreThanZero(BigDecimal decimal)
  6. isNegative(BigDecimal inValue)
  7. isNotNullOrZero(final BigDecimal number)
  8. isNotSameAbsValue(final BigDecimal v1, final BigDecimal v2)
  9. isNotZero(final BigDecimal value)