public abstract class InputFormatter extends Object
| 构造器 | 说明 |
|---|---|
InputFormatter() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
abstract void |
clean() |
Clears the
InputFormatter object. |
static InputFormatter |
getInstance(String regionCode) |
Obtains an
InputFormatter instance associated with the specified
regionCode. |
abstract int |
getPosition() |
Obtains the position where the character was inserted in the last invocation
of
inputNumberAndRememberPosition(char). |
abstract String |
inputNumber(char nextChar) |
Inputs the next character to obtain the formatting results of all previously
input characters.
|
abstract String |
inputNumberAndRememberPosition(char nextChar) |
Inputs the next character to obtain the formatting results of all previously
input characters, and records the position where
nextChar is
inserted. |
public abstract String inputNumber(char nextChar)
nextChar - Indicates the next character to input.public abstract int getPosition()
inputNumberAndRememberPosition(char).inputNumberAndRememberPosition(char).inputNumberAndRememberPosition(char)public abstract void clean()
InputFormatter object.public abstract String inputNumberAndRememberPosition(char nextChar)
nextChar is
inserted. The recorded position can be obtained by
getPosition().nextChar - Indicates the next character to input.getPosition()public static InputFormatter getInstance(String regionCode)
InputFormatter instance associated with the specified
regionCode.regionCode - Indicates the region to which the
InputFormatter instance belongs.InputFormatter instance associated with the
specified regionCode.