add method

This commit is contained in:
Looly
2021-11-05 00:54:30 +08:00
parent 9c6339a99c
commit fa4f71a112
5 changed files with 38 additions and 10 deletions

View File

@@ -44,7 +44,7 @@ import java.util.TimeZone;
* 注意:
*
* <pre>
* 当isMatchSecond为<code>true</code>时才会匹配秒部分
* 当isMatchSecond为{@code true}时才会匹配秒部分
* 默认都是关闭的
* </pre>
*
@@ -124,7 +124,7 @@ public class CronPattern {
*
* @param millis 时间毫秒数
* @param isMatchSecond 是否匹配秒
* @return 如果匹配返回 <code>true</code>, 否则返回 <code>false</code>
* @return 如果匹配返回 {@code true}, 否则返回 {@code false}
*/
public boolean match(long millis, boolean isMatchSecond) {
return match(TimeZone.getDefault(), millis, isMatchSecond);
@@ -136,7 +136,7 @@ public class CronPattern {
* @param timezone 时区 {@link TimeZone}
* @param millis 时间毫秒数
* @param isMatchSecond 是否匹配秒
* @return 如果匹配返回 <code>true</code>, 否则返回 <code>false</code>
* @return 如果匹配返回 {@code true}, 否则返回 {@code false}
*/
public boolean match(TimeZone timezone, long millis, boolean isMatchSecond) {
final GregorianCalendar calendar = new GregorianCalendar(timezone);
@@ -149,7 +149,7 @@ public class CronPattern {
*
* @param calendar 时间
* @param isMatchSecond 是否匹配秒
* @return 如果匹配返回 <code>true</code>, 否则返回 <code>false</code>
* @return 如果匹配返回 {@code true}, 否则返回 {@code false}
*/
public boolean match(GregorianCalendar calendar, boolean isMatchSecond) {
final int second = calendar.get(Calendar.SECOND);