public interface SimpleConverter
A SimpleConverter
converts an object from or to a
String
representation (without making any assumptions about the context).
Implement this interface to provide basic conversion between string and
object representations. Returns a null value to indicate error conditions:
it is your responsibility to handle these.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAsObject(java.lang.String value,
java.util.Locale l)
Parses a string into a Java object.
|
java.lang.String |
getAsString(java.lang.Object obj,
java.util.Locale l)
Converts objects to a string in the specified locale.
|
static final java.lang.String COPYRIGHT
java.lang.String getAsString(java.lang.Object obj, java.util.Locale l)
obj
- The application object or datl
- The target localejava.lang.Object getAsObject(java.lang.String value, java.util.Locale l)
value
- The (possibly localized) string representation of the objectl
- The locale into which the string is to be translated