N - public abstract class AbstractNumberConverter<N extends Number> extends AbstractConverter<N>
| Constructor and Description |
|---|
AbstractNumberConverter() |
| Modifier and Type | Method and Description |
|---|---|
String |
convertToString(N value,
Locale locale)
Converts the given value to a string.
|
abstract NumberFormat |
getNumberFormat(Locale locale) |
protected N |
parse(Object value,
double min,
double max,
Locale locale)
Parses a value as a String and returns a Number.
|
getTargetType, newConversionException, parseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertToObjectpublic abstract NumberFormat getNumberFormat(Locale locale)
locale - protected N parse(Object value, double min, double max, Locale locale)
value - The object to parse (after converting with toString())min - The minimum allowed valuemax - The maximum allowed valuelocale - ConversionException - if value is unparsable or out of rangepublic String convertToString(N value, Locale locale)
IConverterconvertToString in interface IConverter<N extends Number>convertToString in class AbstractConverter<N extends Number>value - The value to convertlocale - The locale used to convert the valueIConverter.convertToString(java.lang.Object, Locale)Copyright © 2006–2014 Apache Software Foundation. All rights reserved.