public class CrnItem_dd extends Object
支持 "W" 工作日的方法:
"W" : 仅被用于天(月)子表达式,表示工作日
> "W" 为所有工作日
> "4W" 为距离本月第5日最近的工作日
> "4LW" 为距离当月倒数第4日最近的工作日
值如果表示工作日,则被 +100,那么
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
ignoreAnyWhenPrevAllAny
如果前面都是 ANY 类型,是否输出文本时是否忽略 ANY 值
|
protected boolean |
ignoreZeroWhenPrevHasSpan
如果前面有 SPAN 类型,是否输出文本时是否忽略 0 值
|
protected org.nutz.plugins.zcron.CrnStdItem[] |
prevItems
指向前一个逻辑上的表达式,比如,年前面应该是月,月前面应该是日和周
这个主要用来
joinText好缩减输入的 ANY 文字 |
protected boolean |
supportLast
是否支持 "L" 标记
|
protected boolean |
supportMOD
支持从后面数,等特殊标示的值
|
protected int[] |
values
数组表示一个值的范围:
[类型(ANY|RANGE|LIST|SPAN|ONE)], [值1], [值2] ...
|
| 构造器和说明 |
|---|
CrnItem_dd(org.nutz.plugins.zcron.CrnStdItem... prevs) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
__eval(String str,
String[] dict,
int dictOffset)
根据一个值,评估出一个数值来,这里判断了 "L" 的问题
|
protected boolean |
_match_(int v,
int[] refs) |
protected int |
eval4override(String str) |
boolean |
isAllWorkingDay() |
boolean |
isANY() |
boolean |
isPrevAllAny() |
boolean |
isPrevHasSpan() |
boolean |
isReferWorkingDay() |
boolean |
isSPAN() |
void |
joinText(List<String> ary,
ZCroni18n i18n,
String key)
将自身的描述,添加到一个列表里
|
int |
joinText(List<String> ary,
ZCroni18n i18n,
String key,
int off,
boolean ignoreSuffix)
将自身的描述,添加到一个列表里
|
protected boolean |
match(Calendar c)
是否匹配一个日期
|
boolean |
match(int v,
int min,
int max)
判断给定值是否匹配, 给出一个值的范围,以便解析 -1 的值
|
protected void |
parse(String str) |
protected int[] |
prepare(int max)
根据值的范围,返回一个新的 values 数组,这里解决的 "L" 修饰符的问题
|
org.nutz.plugins.zcron.CrnDateItem |
setIgnoreAnyWhenPrevAllAny(boolean ignore) |
org.nutz.plugins.zcron.CrnStdItem |
setIgnoreZeroWhenPrevHasSpan(boolean ignore) |
protected org.nutz.plugins.zcron.CrnStdItem[] prevItems
这个主要用来joinText好缩减输入的 ANY 文字
protected int[] values
[类型(ANY|RANGE|LIST|SPAN|ONE)], [值1], [值2] ...值支持 -1,表示表达式中的 "L" 修饰符
protected boolean supportLast
protected boolean ignoreZeroWhenPrevHasSpan
protected boolean ignoreAnyWhenPrevAllAny
protected boolean supportMOD
public boolean isAllWorkingDay()
public boolean isReferWorkingDay()
protected boolean match(Calendar c)
c - 日期protected int eval4override(String str)
public boolean match(int v,
int min,
int max)
v - 被判断的值min - 最小值(包括) , -1 表示不限制max - 最大值(不包括) , -1 表示不限制public org.nutz.plugins.zcron.CrnDateItem setIgnoreAnyWhenPrevAllAny(boolean ignore)
public org.nutz.plugins.zcron.CrnStdItem setIgnoreZeroWhenPrevHasSpan(boolean ignore)
protected void parse(String str)
public boolean isANY()
public boolean isSPAN()
public boolean isPrevAllAny()
public boolean isPrevHasSpan()
public void joinText(List<String> ary, ZCroni18n i18n, String key)
ary - 要添加的列表i18n - 字典key - 自己对应到字典里的键public int joinText(List<String> ary, ZCroni18n i18n, String key, int off, boolean ignoreSuffix)
ary - 要添加的列表i18n - 字典key - 自己对应到字典里的键off - 读取自己值(this.values)的偏移量ignoreSuffix - 是否忽略后缀(this.values)protected boolean _match_(int v,
int[] refs)
protected int[] prepare(int max)
max - 最大值(不包括)Copyright © 2020. All rights reserved.