com.ibm.as400.ui.framework.java
Class StringFormatter
java.lang.Object
com.ibm.as400.ui.framework.java.DataFormatter
com.ibm.as400.ui.framework.java.StringFormatter
public class StringFormatter
extends DataFormatter
Formatter for exchanging String values between
DataBean
s and user interface components.
If parsing is unsuccessful, an IllegalUserDataException
is thrown.
Since:
v4r2m0
Version:
1.0, 06/01/98
Author:
B. Cragun
See Also: DataFormatter
,
IllegalUserDataException
Constructor Summary
StringFormatter (int minLength,
int maxLength)
Constructs a StringFormatter
.
Method Summary
Object
parse (String source)
Parses a string to produce a String
object.
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
StringFormatter
public StringFormatter (int minLength,
int maxLength)
Constructs a StringFormatter
.
Parameters: minValue
- the minimum lengthmaxValue
- the maximum lengthSince:
v4r2m0
parse
public Object parse (String source)
throws IllegalUserDataException
Parses a string to produce a String
object.
Parsing includes trimming whitespace and checking length.
Throws an IllegalUserDataException
if parsing fails.
Overrides: parse
in class DataFormatter
Parameters: source
- the string to be parsed
Returns: the String object obtained by parsing the string
Throws:
IllegalUserDataException
Since:
v4r2m0