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

java.lang.Object
  extended by com.ibm.as400.ui.framework.java.DataFormatter
      extended by com.ibm.as400.ui.framework.java.IntFormatter
          extended by com.ibm.as400.ui.framework.java.IntPlainFormatter

public class IntPlainFormatter
extends IntFormatter

Formatter for exchanging Integer values between DataBeans and user interface components. Formats without decorations or punctuation. If parsing is unsuccessful, an IllegalUserDataException is thrown.

Since:
v5r2m0
Version:
1.0, 08/20/01
Author:
B. Cragun
See Also:
IntFormatter, IllegalUserDataException

Constructor Summary
Constructor and Description
IntPlainFormatter(int minValue, int maxValue)
          Constructs a IntPlainFormatter.
 
Method Summary
Modifier and Type Method and Description
 String format(int number)
          Format an integer number with no punctuation or decoration.
 String format(Object obj)
          Format a number as an integer with no puctuation of decoration.
 
Methods inherited from class com.ibm.as400.ui.framework.java.IntFormatter
parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntPlainFormatter

public IntPlainFormatter(int minValue,
                         int maxValue)
Constructs a IntPlainFormatter.

Parameters:
minValue - the minimum value required
maxValue - the maximum value required
Since:
v5r2m0
Method Detail

format

public String format(int number)
Format an integer number with no punctuation or decoration.

Overrides:
format in class IntFormatter
Parameters:
number - a valid int number.
Since:
v5r2m0

format

public String format(Object obj)
Format a number as an integer with no puctuation of decoration. Throws an IllegalArgumentException if the object is not an instance of Long or Integer.

Overrides:
format in class IntFormatter
Parameters:
obj - a valid Date object cast as an object.
Returns:
formatted string
Since:
v5r1m0