com.ibm.bpc.clientcore.converter

Interface SimpleConverter


  1. 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
  1. static
  2. java.lang.String
COPYRIGHT

Method Summary

Modifier and Type Method and Description
  1. java.lang.Object
getAsObject(java.lang.String value,java.util.Locale l)
Parses a string into a Java object.
  1. java.lang.String
getAsString(java.lang.Object obj,java.util.Locale l)
Converts objects to a string in the specified locale.

Field Detail

  1. static final java.lang.String COPYRIGHT
See Also:

Method Detail

getAsString

  1. java.lang.String getAsString(java.lang.Object obj,
  2. 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

  1. java.lang.Object getAsObject(java.lang.String value,
  2. 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.