public class DayOfMonthMatcher extends BoolArrayMatcher
bValues, minValue
Constructor and Description |
---|
DayOfMonthMatcher(List<Integer> intValueList)
构造
|
Modifier and Type | Method and Description |
---|---|
int |
getMinValue(int month,
boolean isLeapYear)
获取匹配的最小值
|
boolean |
match(int value,
int month,
boolean isLeapYear)
给定的日期是否匹配当前匹配器
|
int |
nextAfter(int value,
int month,
boolean isLeapYear)
获取指定值之后的匹配值,也可以是指定值本身
如果表达式中存在最后一天(如使用"L"),则: 4月、6月、9月、11月最多匹配到30日 4月闰年匹配到29日,非闰年28日 |
getMinValue, nextAfter, test, toString
public boolean match(int value, int month, boolean isLeapYear)
value
- 被检查的值,此处为日month
- 实际的月份,从1开始isLeapYear
- 是否闰年public int nextAfter(int value, int month, boolean isLeapYear)
value
- 指定的值month
- 月份,从1开始isLeapYear
- 是否为闰年public int getMinValue(int month, boolean isLeapYear)
month
- 月,base1isLeapYear
- 是否闰年Copyright © 2025. All rights reserved.