org.apache.wicket.util.convert.converters
Class AbstractNumberConverter
java.lang.Object
org.apache.wicket.util.convert.converters.AbstractConverter
org.apache.wicket.util.convert.converters.AbstractNumberConverter
- All Implemented Interfaces:
- Serializable, IClusterable, IConverter
- Direct Known Subclasses:
- AbstractDecimalConverter, AbstractIntegerConverter
public abstract class AbstractNumberConverter
- extends AbstractConverter
Base class for all number converters.
- Author:
- Jonathan Locke
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractNumberConverter
public AbstractNumberConverter()
getNumberFormat
public abstract NumberFormat getNumberFormat(Locale locale)
- Parameters:
locale
-
- Returns:
- Returns the numberFormat.
parse
protected Number parse(Object value,
double min,
double max,
Locale locale)
- Parses a value as a String and returns a Number.
- Parameters:
value
- The object to parse (after converting with toString())min
- The minimum allowed valuemax
- The maximum allowed valuelocale
-
- Returns:
- The number
- Throws:
ConversionException
- if value is unparsable or out of range
convertToString
public String convertToString(Object value,
Locale locale)
- Description copied from interface:
IConverter
- Converts the given value to a string.
- Specified by:
convertToString
in interface IConverter
- Overrides:
convertToString
in class AbstractConverter
- Parameters:
value
- The value to convertlocale
- The locale used to convert the value
- Returns:
- The converted string value
- See Also:
IConverter.convertToString(java.lang.Object, Locale)
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.