All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.ui.framework.java.DataFormatter

java.lang.Object
   |
   +----com.ibm.as400.ui.framework.java.DataFormatter

public class DataFormatter
extends Object
The base class for objects which format data that is exchanged between DataBeans and user interface components. DataFormatter defines the programming interface for formatting data for presentation (the format method) and for parsing user data into a form suitable for use by DataBeans (the parse method). If parsing is unsuccessful, an IllegalUserDataException is thrown.

The base class implementations of format and parse merely return their arguments with leading and trailing blanks removed.

See Also:
DataBean, IllegalUserDataException

Constructor Index

 o DataFormatter()
Constructs a DataFormatter.

Method Index

 o format(Object)
Formats an object to produce a string.
 o parse(String)
Parses a string to produce an object.

Constructors

 o DataFormatter
 public DataFormatter()
Constructs a DataFormatter.

Methods

 o format
 public String format(Object obj)
Formats an object to produce a string.

Parameters:
obj - the object to format
Returns:
formatted string
 o parse
 public Object parse(String source) throws IllegalArgumentException
Parses a string to produce an object.

Parameters:
source - the string to be parsed
Returns:
the object obtained by parsing the string

All Packages  Class Hierarchy  This Package  Previous  Next  Index