protected void processIncrement(IncrementValue incr) { String startValue = incr.getStart(); Integer start = startValue.equals("*") ? 0 : this.parseInt(startValue); // make sure it's a valid value this.assertValid(start); Integer interval = this.parseInt(incr.getInterval()); this.absoluteValues.add(start); int next = start + interval; int maxValue = this.getMaxValue(); while (next <= maxValue) { this.absoluteValues.add(next); next = next + interval; } }
protected void assertValid(Integer value) throws IllegalArgumentException { if (value == null) { throw EjbLogger.EJB3_TIMER_LOGGER.couldNotParseScheduleExpression(this.origValue); } int max = this.getMaxValue(); int min = this.getMinValue(); if (value > max || value < min) { throw EjbLogger.EJB3_TIMER_LOGGER.invalidValuesRange(value, min, max); } }
for (int i = rangeStart; i <= this.getMaxValue(); i++) { this.absoluteValues.add(i);
protected void processIncrement(IncrementValue incr) { String startValue = incr.getStart(); Integer start = startValue.equals("*") ? 0 : this.parseInt(startValue); // make sure it's a valid value this.assertValid(start); Integer interval = this.parseInt(incr.getInterval()); this.absoluteValues.add(start); int next = start + interval; int maxValue = this.getMaxValue(); while (next <= maxValue) { this.absoluteValues.add(next); next = next + interval; } }
protected void assertValid(Integer value) throws IllegalArgumentException { if (value == null) { throw MESSAGES.couldNotParseScheduleExpression(this.origValue); } int max = this.getMaxValue(); int min = this.getMinValue(); if (value > max || value < min) { throw MESSAGES.invalidValuesRange(value,min,max); } }
for (int i = rangeStart; i <= this.getMaxValue(); i++) { this.absoluteValues.add(i);