Java BigDecimal Max max(BigDecimal a, BigDecimal b)

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

Description

Returns the maximum value between the two.

License

Apache License

Parameter

Parameter Description
a a parameter
b a parameter

Declaration

private static BigDecimal max(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.j  a v  a 2 s  .co m*/
     * Returns the maximum value between the two.
     * @param a
     * @param b
     * @return
     */
    private static BigDecimal max(BigDecimal a, BigDecimal b) {
        if (a == null)
            return b;
        if (b == null)
            return a;
        return a.max(b);
    }
}

Related

  1. max(BigDecimal b1, BigDecimal b2)
  2. max(BigDecimal one, BigDecimal other)
  3. max(BigDecimal... amounts)
  4. max(BigDecimal... values)