|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.lessy.util.NumberUtil
public class NumberUtil
| Constructor Summary | |
|---|---|
NumberUtil()
|
|
| Method Summary | |
|---|---|
static BigDecimal |
checkNumber(Object value)
Checks if the passed value is a number |
static int |
convertToInt(Integer value,
int defaultValue)
Converts a (big) Integer to a small int. |
static Long |
convertToLong(Number number)
Converts a Number to (big) Long |
static Number |
convertToNumber(Amount amount)
Converts an Amount to its associated Number (usually a BigDecimal) |
static Number |
convertToNumber(Amount amount,
Number defaultValue)
Converts an Amount to its associated Number (usually a BigDecimal) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NumberUtil()
| Method Detail |
|---|
public static Long convertToLong(Number number)
number - Nmber to convert
public static int convertToInt(Integer value,
int defaultValue)
value - The Integer to convertdefaultValue - Return if value is null
public static Number convertToNumber(Amount amount)
amount - Amount to convert
public static Number convertToNumber(Amount amount,
Number defaultValue)
amount - Amount to convertdefaultValue - Value to return if the passed amount is null
public static BigDecimal checkNumber(Object value)
value - Value to be tested. Can be any type. Tested will be the toString()-result.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||