add chineseToNumber

This commit is contained in:
Looly
2021-03-10 17:44:52 +08:00
parent fc47566ddc
commit 5cdbd16c0b
8 changed files with 84 additions and 138 deletions

View File

@@ -15,7 +15,7 @@ import java.util.concurrent.locks.ReentrantLock;
* 定时任务工具类<br>
* 此工具持有一个全局{@link Scheduler},所有定时任务在同一个调度器中执行<br>
* {@link #setMatchSecond(boolean)} 方法用于定义是否使用秒匹配模式如果为true则定时任务表达式中的第一位为秒否则为分默认是分
*
*
* @author xiaoleilu
*
*/
@@ -31,7 +31,7 @@ public class CronUtil {
/**
* 自定义定时任务配置文件
*
*
* @param cronSetting 定时任务配置文件
*/
public static void setCronSetting(Setting cronSetting) {
@@ -40,7 +40,7 @@ public class CronUtil {
/**
* 自定义定时任务配置文件路径
*
*
* @param cronSettingPath 定时任务配置文件路径(相对绝对都可)
*/
public static void setCronSetting(String cronSettingPath) {
@@ -54,8 +54,8 @@ public class CronUtil {
/**
* 设置是否支持秒匹配<br>
* 此方法用于定义是否使用秒匹配模式如果为true则定时任务表达式中的第一位为秒否则为分默认是分<br>
*
* @param isMatchSecond <code>true</code>支持,<code>false</code>不支持
*
* @param isMatchSecond {@code true}支持,{@code false}不支持
*/
public static void setMatchSecond(boolean isMatchSecond) {
scheduler.setMatchSecond(isMatchSecond);
@@ -63,7 +63,7 @@ public class CronUtil {
/**
* 加入定时任务
*
*
* @param schedulingPattern 定时任务执行时间的crontab表达式
* @param task 任务
* @return 定时任务ID
@@ -74,7 +74,7 @@ public class CronUtil {
/**
* 加入定时任务
*
*
* @param id 定时任务ID
* @param schedulingPattern 定时任务执行时间的crontab表达式
* @param task 任务
@@ -88,7 +88,7 @@ public class CronUtil {
/**
* 加入定时任务
*
*
* @param schedulingPattern 定时任务执行时间的crontab表达式
* @param task 任务
* @return 定时任务ID
@@ -99,7 +99,7 @@ public class CronUtil {
/**
* 批量加入配置文件中的定时任务
*
*
* @param cronSetting 定时任务设置文件
*/
public static void schedule(Setting cronSetting) {
@@ -108,7 +108,7 @@ public class CronUtil {
/**
* 移除任务
*
*
* @param schedulerId 任务ID
*/
public static void remove(String schedulerId) {
@@ -117,7 +117,7 @@ public class CronUtil {
/**
* 更新Task的执行时间规则
*
*
* @param id Task的ID
* @param pattern {@link CronPattern}
* @since 4.0.10
@@ -135,7 +135,7 @@ public class CronUtil {
/**
* 开始,非守护线程模式
*
*
* @see #start(boolean)
*/
public static void start() {
@@ -144,14 +144,14 @@ public class CronUtil {
/**
* 开始
*
*
* @param isDaemon 是否以守护线程方式启动如果为true则在调用{@link #stop()}方法后执行的定时任务立即结束,否则等待执行完毕才结束。
*/
synchronized public static void start(boolean isDaemon) {
if (scheduler.isStarted()) {
throw new UtilException("Scheduler has been started, please stop it first!");
}
lock.lock();
try {
if (null == crontabSetting) {
@@ -188,7 +188,7 @@ public class CronUtil {
} finally {
lock.unlock();
}
//重新加载任务
schedule(crontabSetting);
//重新启动