is BigDecimal Negative - Android java.lang

Android examples for java.lang:Math

Description

is BigDecimal Negative

Demo Code


//package com.java2s;

import java.math.BigDecimal;

public class Main {
    public static boolean isNegative(BigDecimal value) {
        return greater(BigDecimal.ZERO, value);
    }// w ww  .ja v a 2  s . c  om

    public static boolean greater(BigDecimal first, BigDecimal second) {
        return first.compareTo(second) == 1;
    }
}

Related Tutorials