示例#1
0
 @Override
 public String asString() {
   switch (specialChar.getValue()) {
     case NONE:
       return getTime().toString();
     case HASH:
       return String.format("%s#%s", getTime(), getNth());
     case W:
       return isDefault(getTime()) ? "W" : String.format("%sW", getTime());
     case L:
       return isDefault(getTime()) ? "L" : String.format("%sL", getTime());
     default:
       return specialChar.toString();
   }
 }
示例#2
0
 public On(IntegerFieldValue time, SpecialCharFieldValue specialChar) {
   this(time, specialChar, new IntegerFieldValue(-1));
   checkArgument(
       !specialChar.getValue().equals(SpecialChar.HASH), "value missing for a#b cron expression");
 }