com.ibm.bpc.clientcore.converter
Interface SimpleConverter
- 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.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
COPYRIGHT
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getAsObject(java.lang.String value,java.util.Locale l)
Parses a string into a Java object.
|
|
getAsString(java.lang.Object obj,java.util.Locale l)
Converts objects to a string in the specified locale.
|
Field Detail
COPYRIGHT
- static final java.lang.String COPYRIGHT
See Also:
Method Detail
getAsString
- java.lang.String getAsString(java.lang.Object obj,
- java.util.Locale l)
Converts objects to a string in the specified locale.
The default time zone is used for the conversion.
Parameters:
obj
- The application object or dat l
- The target locale Returns:
A string representation of the object, or null if an error occurs
getAsObject
- java.lang.Object getAsObject(java.lang.String value,
- java.util.Locale l)
Parses a string into a Java object.
The default time zone is used for the conversion.
Parameters:
value
- The (possibly localized) string representation of the object l
- The locale into which the string is to be translated Returns:
An object represented by the string value, or null if an error occurs.