org.springframework.shell.support.util
Class NumberUtils

java.lang.Object
  extended by org.springframework.shell.support.util.NumberUtils

public final class NumberUtils
extends Object

Provides extra functionality for Java Number classes.

Since:
1.2.0

Method Summary
static BigDecimal max(Number... array)
          Returns the maximum value in the array.
static BigDecimal min(Number... array)
          Returns the minimum value in the array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

min

public static BigDecimal min(Number... array)
Returns the minimum value in the array.

Parameters:
array - an array of Numbers (can be null)
Returns:
the minimum value in the array, or null if all the elements are null

max

public static BigDecimal max(Number... array)
Returns the maximum value in the array.

Parameters:
array - an array of Numbers (can be null)
Returns:
the maximum value in the array, or null if all the elements are null