Java BigDecimal Min minus(BigDecimal decimal)

Here you can find the source of minus(BigDecimal decimal)

Description

decimal * -1;

License

Apache License

Parameter

Parameter Description
decimal decimal

Return

decimal * -1

Declaration

public static BigDecimal minus(BigDecimal decimal) 

Method Source Code


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

import java.math.BigDecimal;

public class Main {
    /**//from  w  ww. j a  v  a2s  .  c o  m
     * The value -1, with a scale of 0.
     */
    public static final BigDecimal MINUS_ONE = BigDecimal.valueOf(-1L);

    /**
     * decimal * -1;
     *
     * @param decimal decimal
     * @return decimal * -1
     */
    public static BigDecimal minus(BigDecimal decimal) {
        return decimal.multiply(MINUS_ONE);
    }
}

Related

  1. min(final BigDecimal v1, final BigDecimal v2)
  2. min(List numbers)
  3. minimum(BigDecimal... decimals)
  4. minimum(BigDecimal... values)
  5. minus(BigDecimal a, BigDecimal b)
  6. minus(BigDecimal num1, BigDecimal num2)
  7. minusMultiply(BigDecimal num)
  8. minValue(BigDecimal[] bigDecimalNumbers)