Class DateTimeMatcher
java.lang.Object
org.aoju.bus.cron.pattern.matcher.DateTimeMatcher
日期和时间的单一匹配器
- Since:
- Java 17+
- Version:
- 6.5.0
- Author:
- Kimi Liu
-
Constructor Summary
ConstructorsConstructorDescriptionDateTimeMatcher(ValueMatcher secondMatcher, ValueMatcher minuteMatcher, ValueMatcher hourMatchers, ValueMatcher dayOfMonthMatchers, ValueMatcher monthMatchers, ValueMatcher dayOfWeekMatchers, ValueMatcher yearMatchers) -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatch(int second, int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year) 给定时间是否匹配定时任务表达式
-
Constructor Details
-
DateTimeMatcher
public DateTimeMatcher(ValueMatcher secondMatcher, ValueMatcher minuteMatcher, ValueMatcher hourMatchers, ValueMatcher dayOfMonthMatchers, ValueMatcher monthMatchers, ValueMatcher dayOfWeekMatchers, ValueMatcher yearMatchers)
-
-
Method Details
-
match
public boolean match(int second, int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year) 给定时间是否匹配定时任务表达式- Parameters:
second- 秒数,-1表示不匹配此项minute- 分钟hour- 小时dayOfMonth- 天month- 月dayOfWeek- 周几year- 年- Returns:
- 如果匹配返回
true, 否则返回false
-