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 SimpleValueParser(int min, int max)
min
- 最小值(包括)max
- 最大值(包括)public int parse(String value) throws CronException
ValueParser
parse
in interface ValueParser
value
- String值CronException
public int getMin()
ValueParser
getMin
in interface ValueParser
public int getMax()
ValueParser
getMax
in interface ValueParser
Copyright © 2021. All rights reserved.