public abstract class NumberConverter<T extends Number> extends Object implements Converter<T>
| Constructor and Description |
|---|
NumberConverter() |
| Modifier and Type | Method and Description |
|---|---|
String |
format(T value)
Converts a value of the type returned by
Converter.getValueType() to its
plain text representation. |
abstract Class<? extends T> |
getValueType()
Gets the value type.
|
T |
parse(String value)
Converts a value from its plain text representation to a Java object instance
of the type returned by
Converter.getValueType(). |
protected abstract T |
parseNumber(String value) |
public abstract Class<? extends T> getValueType()
ConvertergetValueType in interface Converter<T extends Number>public T parse(String value) throws ConversionException
ConverterConverter.getValueType().parse in interface Converter<T extends Number>value - The textual representation of the value.ConversionException - If the conversion fails.protected abstract T parseNumber(String value) throws NumberFormatException
NumberFormatExceptionpublic String format(T value)
ConverterConverter.getValueType() to its
plain text representation.Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.