Java BigDecimal Min min(BigDecimal a, BigDecimal b)

Here you can find the source of min(BigDecimal a, BigDecimal b)

Description

Returns the minimum value between the two.

License

Apache License

Parameter

Parameter Description
a a parameter
b a parameter

Declaration

private static BigDecimal min(BigDecimal a, BigDecimal b) 

Method Source Code


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

import java.math.BigDecimal;

public class Main {
    /**/*  w  w  w .  jav a2 s.  c o  m*/
     * Returns the minimum value between the two. 
     * @param a
     * @param b
     * @return
     */
    private static BigDecimal min(BigDecimal a, BigDecimal b) {
        if (a == null)
            return b;
        if (b == null)
            return a;
        return a.min(b);
    }
}

Related

  1. min(BigDecimal b1, BigDecimal b2)
  2. min(BigDecimal one, BigDecimal other)
  3. min(BigDecimal... amounts)
  4. min(final BigDecimal bd1, final BigDecimal bd2)