org.appfuse.util
Class CurrencyConverter
java.lang.Object
org.appfuse.util.CurrencyConverter
- All Implemented Interfaces:
- org.apache.commons.beanutils.Converter
public class CurrencyConverter
- extends java.lang.Object
- implements org.apache.commons.beanutils.Converter
This class is converts a Double to a double-digit String
(and vise-versa) by BeanUtils when copying properties.
- Author:
- Matt Raible
|
Field Summary |
protected java.text.DecimalFormat |
formatter
|
protected org.apache.commons.logging.Log |
log
|
|
Method Summary |
java.lang.Object |
convert(java.lang.Class type,
java.lang.Object value)
Convert a String to a Double and a Double to a String |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final org.apache.commons.logging.Log log
formatter
protected final java.text.DecimalFormat formatter
CurrencyConverter
public CurrencyConverter()
convert
public final java.lang.Object convert(java.lang.Class type,
java.lang.Object value)
- Convert a String to a Double and a Double to a String
- Specified by:
convert in interface org.apache.commons.beanutils.Converter
- Parameters:
type - the class type to outputvalue - the object to convert
- Returns:
- object the converted object (Double or String)
Copyright © 2003-2007. All Rights Reserved.