Java BigDecimal signum(final BigDecimal value)

Here you can find the source of signum(final BigDecimal value)

Description

If value is null return 0 otherwise the signum().

License

Apache License

Parameter

Parameter Description
value a parameter

Declaration

public static int signum(final BigDecimal value) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.math.BigDecimal;

public class Main {
    /**//  w w  w  .  j a va2s .co  m
     * If value is null return 0 otherwise the signum().
     * 
     * @param value
     * @return
     */
    public static int signum(final BigDecimal value) {
        return value == null ? 0 : value.signum();
    }
}

Related

  1. scalarMult(BigDecimal scalar, Vector a)
  2. scale(BigDecimal b1, BigDecimal b2)
  3. scale2(BigDecimal valor)
  4. scaleCurrency(BigDecimal amount)
  5. secondsBigDecimalFromDuration(long s, int n)
  6. sine(BigDecimal x)
  7. sortByValues( Map map)
  8. sortMapByBDValue(Map oriMap)
  9. stdBigDecimal(List vector, BigDecimal avg)