C - public abstract class AbstractConverter<C> extends Object implements IConverter<C>
| Constructor and Description |
|---|
AbstractConverter() |
| Modifier and Type | Method and Description |
|---|---|
String |
convertToString(C value,
Locale locale)
Converts the given value to a string.
|
protected abstract Class<C> |
getTargetType() |
protected ConversionException |
newConversionException(String message,
Object value,
Locale locale)
Creates a conversion exception for throwing
|
protected C |
parse(Format format,
Object value,
Locale locale)
Parses a value using one of the java.util.text format classes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertToObjectprotected C parse(Format format, Object value, Locale locale)
format - The format to usevalue - The object to parselocale - The locale to use to parse.ConversionException - Thrown if parsing failsprotected ConversionException newConversionException(String message, Object value, Locale locale)
message - The messagevalue - The value that didn't convertlocale - The localeprotected abstract Class<C> getTargetType()
public String convertToString(C value, Locale locale)
IConverterconvertToString in interface IConverter<C>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.