/** * Creates a {@link RangeValue} by parsing the passed <code>value</code>. * <p> * Upon successfully parsing the passed <code>value</code>, this constructor * sets the start and the end value of this {@link RangeValue} * </p> * * @param range The value to be parsed * @throws IllegalArgumentException If the passed <code>value</code> cannot be * represented as an {@link RangeValue} */ public RangeValue(String range) { String[] values = getRangeValues(range); if (values == null || values.length != 2) { throw EjbLogger.EJB3_TIMER_LOGGER.invalidRange(range); } this.rangeStart = values[0].trim(); this.rangeEnd = values[1].trim(); }
/** * Creates a {@link RangeValue} by parsing the passed <code>value</code>. * <p> * Upon successfully parsing the passed <code>value</code>, this constructor * sets the start and the end value of this {@link RangeValue} * </p> * * @param range The value to be parsed * @throws IllegalArgumentException If the passed <code>value</code> cannot be * represented as an {@link RangeValue} */ public RangeValue(String range) { String[] values = getRangeValues(range); if (values == null || values.length != 2) { throw MESSAGES.invalidRange(range); } this.rangeStart = values[0].trim(); this.rangeEnd = values[1].trim(); }