|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.core.converter.DefaultObjectConverter
org.norther.tammi.core.converter.DefaultNumberConverter
public class DefaultNumberConverter
A default implementation of NumberConverter.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.core.converter.NumberConverter |
|---|
CURRENCY, CURRENCY_IN_CENTS, DEFAULT, INTEGER, NUMBER, PERCENT |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
DefaultNumberConverter()
Constructs a new converter. |
|
| Method Summary | |
|---|---|
Object |
getInstance(String className,
Object object,
String pattern,
Object minValue,
Object maxValue)
Gets an instance of the named class by converting the source object and optionally applying the specified pattern and limits. |
Object |
getInstance(String className,
Object object,
String pattern,
Object minValue,
Object maxValue,
Locale locale,
ResourceBundle bundle)
Gets an instance of the named class by converting the localized source resource and optionally applying the specified pattern and limits. |
NumberFormat |
getNumberFormat(String pattern)
Gets a number format for the specified pattern. |
NumberFormat |
getNumberFormat(String pattern,
Locale locale)
Gets a number format for the specified pattern and locale. |
String |
toString(String className,
Object object,
String pattern)
Returns a string representation of an object of the named class by optionally applying the specified pattern. |
String |
toString(String className,
Object object,
String pattern,
Locale locale,
ResourceBundle bundle)
Returns a localized resource of the named class by optionally applying the specified pattern. |
| Methods inherited from class org.norther.tammi.core.converter.DefaultObjectConverter |
|---|
fromLocalizedObject, getComponentInstance, getFormatPattern, getInstance, getLocalizedPattern, getResourceFinderName, isConversionSupported, postmanaged, setResourceFinderName, toComponentString, toLocalizedObject, toString, toStrings, toStrings, toStrings, unmanaged |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.converter.ObjectConverter |
|---|
getFormatPattern, getInstance, getLocalizedPattern, getResourceFinderName, isConversionSupported, setResourceFinderName, toString, toStrings, toStrings, toStrings |
| Constructor Detail |
|---|
public DefaultNumberConverter()
| Method Detail |
|---|
public NumberFormat getNumberFormat(String pattern)
NumberConverter
getNumberFormat in interface NumberConverterpattern - the pattern.
NumberFormat,
DecimalFormat
public NumberFormat getNumberFormat(String pattern,
Locale locale)
NumberConverter
getNumberFormat in interface NumberConverterpattern - the pattern.locale - the locale.
NumberFormat,
DecimalFormat
public Object getInstance(String className,
Object object,
String pattern,
Object minValue,
Object maxValue)
throws ConversionException
ObjectConverter
getInstance in interface ObjectConvertergetInstance in class DefaultObjectConverterclassName - the name of the class.object - the source object.pattern - an optional conversion pattern.minValue - an optional minimum value.maxValue - an optional maximum value.
ConversionException - if conversion fails.
public Object getInstance(String className,
Object object,
String pattern,
Object minValue,
Object maxValue,
Locale locale,
ResourceBundle bundle)
throws ConversionException
ObjectConverter
getInstance in interface ObjectConvertergetInstance in class DefaultObjectConverterclassName - the name of the class.object - the source object.pattern - an optional conversion pattern.minValue - an optional minimum value.maxValue - an optional maximum value.locale - the locale of the source object.bundle - the resource bundle to apply.
ConversionException - if conversion fails.
public String toString(String className,
Object object,
String pattern)
ObjectConverter
toString in interface ObjectConvertertoString in class DefaultObjectConverterclassName - the name of the class.object - the source object.pattern - an optional conversion pattern.
public String toString(String className,
Object object,
String pattern,
Locale locale,
ResourceBundle bundle)
ObjectConverter
toString in interface ObjectConvertertoString in class DefaultObjectConverterclassName - the name of the class.object - the source object.pattern - the conversion pattern.locale - the optional locale of the result.bundle - the resource bundle to apply.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||