|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.retek.commons.util.MoneyUtility
Money Utility object that helps the UI format and unformat certain data.
Constructor Summary | |
---|---|
MoneyUtility()
|
Method Summary | |
---|---|
static Money |
getMoney(java.lang.String amount)
Retrieves a money object for the string amount. |
static Money |
getMoney(java.lang.String amount,
boolean returnNull)
Retrieves a money object for the string amount. |
static java.lang.String |
getString(Money money)
Retrieves the string value of the money object. |
static java.lang.String |
getString(Money money,
boolean defaultEmpty)
Retrieves the string value of the money object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MoneyUtility()
Method Detail |
public static Money getMoney(java.lang.String amount)
amount
- The amount to convert into a money object.
java.lang.NumberFormatException
- Thrown if the amount cannot be converted into Money.public static Money getMoney(java.lang.String amount, boolean returnNull)
amount
- The amount to convert into a money object.returnNull
- If true, method returns null for empty amounts. If false, returns $0.00
java.lang.NumberFormatException
- Thrown if the amount cannot be converted into Money.public static java.lang.String getString(Money money)
money
- The money object to convert to a string.
public static java.lang.String getString(Money money, boolean defaultEmpty)
money
- The money object to convert to a string.defaultEmpty
- If true, returns empty string for empty money. If false, returns $0.00.
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |