Java BigDecimal Min min(List numbers)

Here you can find the source of min(List numbers)

Description

Returns the min number in the numbers list.

License

Open Source License

Parameter

Parameter Description
numbers the numbers to calculate the min.

Return

the min number in the numbers list.

Declaration

public static BigDecimal min(List<BigDecimal> numbers) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.math.BigDecimal;

import java.util.List;
import java.util.TreeSet;

public class Main {
    /**/* w  ww . j av  a 2s .com*/
    * Returns the min number in the numbers list.
    *
    * @param numbers the numbers to calculate the min.
    * @return the min number in the numbers list.
    */
    public static BigDecimal min(List<BigDecimal> numbers) {
        return new TreeSet<BigDecimal>(numbers).first();
    }
}

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)
  5. min(final BigDecimal v1, final BigDecimal v2)
  6. minimum(BigDecimal... decimals)
  7. minimum(BigDecimal... values)
  8. minus(BigDecimal a, BigDecimal b)
  9. minus(BigDecimal decimal)