public class CronPatternBuilder extends Object implements Builder<String>
Constructor and Description |
---|
CronPatternBuilder() |
Modifier and Type | Method and Description |
---|---|
String |
build()
构建
|
static CronPatternBuilder |
of()
创建构建器
|
CronPatternBuilder |
set(Part part,
String value)
设置对应部分的定时任务值
|
CronPatternBuilder |
setRange(Part part,
int begin,
int end)
设置区间
|
CronPatternBuilder |
setValues(Part part,
int... values)
设置值
|
public static CronPatternBuilder of()
public CronPatternBuilder setValues(Part part, int... values)
part
- 部分,如秒、分、时等values
- 时间值列表public CronPatternBuilder setRange(Part part, int begin, int end)
part
- 部分,如秒、分、时等begin
- 起始值end
- 结束值public CronPatternBuilder set(Part part, String value)
part
- 部分,如秒、分、时等value
- 表达式值,如"*"、"1,2"、"5-12"等Copyright © 2024. All rights reserved.