public class SimpleValueParser extends Object implements ValueParser
| Modifier and Type | Field and Description |
|---|---|
protected int |
max
最大值(包括)
|
protected int |
min
最小值(包括)
|
| Constructor and Description |
|---|
SimpleValueParser(int min,
int max) |
| Modifier and Type | Method and Description |
|---|---|
int |
getMax()
返回最大值
|
int |
getMin()
返回最小值
|
int |
parse(String value)
处理String值并转为int
转换包括:
数字字符串转为数字
别名转为对应的数字(如月份和星期)
|
public int parse(String value) throws CommonException
ValueParserparse in interface ValueParservalue - String值CommonExceptionpublic int getMin()
ValueParsergetMin in interface ValueParserpublic int getMax()
ValueParsergetMax in interface ValueParserCopyright © 2019. All rights reserved.