|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.as400.ui.framework.java.DataFormatter com.ibm.as400.ui.framework.java.LongFormatter
public class LongFormatter extends DataFormatter
Formatter for exchanging Long values between
DataBean
s and user interface components.
If parsing is unsuccessful, an IllegalUserDataException
is thrown.
DataFormatter
,
IllegalUserDataException
Constructor and Description |
---|
LongFormatter(long minValue,
long maxValue)
Constructs a LongFormatter . |
Modifier and Type | Method and Description |
---|---|
String |
format(int number)
Format a long number based on the current locale |
String |
format(Object obj)
Format a number as a long based on the current locale Throws an IllegalArgumentException if the object is not an instance of Long or Integer. |
Object |
parse(String source)
Parses a string to produce a Long object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LongFormatter(long minValue, long maxValue)
LongFormatter
.
minValue
- the minimum value requiredmaxValue
- the maximum value requiredMethod Detail |
---|
public Object parse(String source) throws IllegalUserDataException
Long
object.
Throws an IllegalUserDataException
if parsing fails.
parse
in class DataFormatter
source
- the string to be parsedIllegalUserDataException
public String format(int number)
number
- a valid long
number.public String format(Object obj)
format
in class DataFormatter
obj
- a valid Date
object cast as an object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |