protected void processListItem(String listItem) { // check what type of a value the list item is. // Each item in the list must be an individual attribute value or a range. // List items can not themselves be lists, wild-cards, or increments. ScheduleExpressionType listItemType = ScheduleExpressionTypeUtil.getType(listItem); switch (listItemType) { case SINGLE_VALUE: SingleValue singleVal = new SingleValue(listItem); this.processSingleValue(singleVal); return; case RANGE: RangeValue range = new RangeValue(listItem); this.processRangeValue(range); return; default: throw EjbLogger.EJB3_TIMER_LOGGER.invalidListValue(listItem); } }
protected void processSingleValue(SingleValue singleValue) { String value = singleValue.getValue(); if (this.isRelativeValue(value)) { this.relativeValues.add(singleValue); } else { Integer val = this.parseInt(value); this.assertValid(val); this.absoluteValues.add(val); } }
if (relativeValue instanceof SingleValue) { SingleValue singleValue = (SingleValue) relativeValue; String value = singleValue.getValue(); Integer absoluteDayOfMonth = this.getAbsoluteDayOfMonth(cal, value); eligibleDaysOfMonth.add(absoluteDayOfMonth);
SingleValue singleValue = new SingleValue(value);
protected void processSingleValue(SingleValue singleValue) { String value = singleValue.getValue(); if (this.isRelativeValue(value)) { this.relativeValues.add(singleValue); } else { Integer val = this.parseInt(value); this.assertValid(val); this.absoluteValues.add(val); } }
protected void processListItem(String listItem) { // check what type of a value the list item is. // Each item in the list must be an individual attribute value or a range. // List items can not themselves be lists, wild-cards, or increments. ScheduleExpressionType listItemType = ScheduleExpressionTypeUtil.getType(listItem); switch (listItemType) { case SINGLE_VALUE: SingleValue singleVal = new SingleValue(listItem); this.processSingleValue(singleVal); return; case RANGE: RangeValue range = new RangeValue(listItem); this.processRangeValue(range); return; default: throw MESSAGES.invalidListValue(listItem); } }
if (relativeValue instanceof SingleValue) { SingleValue singleValue = (SingleValue) relativeValue; String value = singleValue.getValue(); Integer absoluteDayOfMonth = this.getAbsoluteDayOfMonth(cal, value); eligibleDaysOfMonth.add(absoluteDayOfMonth);
SingleValue singleValue = new SingleValue(value);