Class RangeValue
- java.lang.Object
-
- org.jboss.as.ejb3.timerservice.schedule.value.RangeValue
-
- All Implemented Interfaces:
ScheduleValue
public class RangeValue extends Object implements ScheduleValue
Represents a value for aScheduleExpressionwhich is expressed as a range type. AnRangeValuecomprises of a start and an end value for the range, separated by a "-"Each side of the range must be an individual attribute value. Members of a range cannot themselves be lists, wild-cards, ranges, or increments. In range ”x-y”, if x is larger than y, the range is equivalent to “x-max, min-y”, where max is the largest value of the corresponding attribute and min is the smallest. The range “x-x”, where both range values are the same, evaluates to the single value x.
- Version:
- $Revision: $
- Author:
- Jaikiran Pai
- See Also:
ScheduleExpressionType.RANGE
-
-
Field Summary
Fields Modifier and Type Field Description static StringRANGE_SEPARATORThe separator which is used for parsing aStringwhich represents aRangeValue
-
Constructor Summary
Constructors Constructor Description RangeValue(String range)Creates aRangeValueby parsing the passedvalue.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccepts(String value)StringasString()StringgetEnd()Returns the end value of thisRangeValueStringgetStart()Returns the start value of thisRangeValue
-
-
-
Field Detail
-
RANGE_SEPARATOR
public static final String RANGE_SEPARATOR
The separator which is used for parsing aStringwhich represents aRangeValue- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RangeValue
public RangeValue(String range)
Creates aRangeValueby parsing the passedvalue.Upon successfully parsing the passed
value, this constructor sets the start and the end value of thisRangeValue- Parameters:
range- The value to be parsed- Throws:
IllegalArgumentException- If the passedvaluecannot be represented as anRangeValue
-
-
Method Detail
-
getStart
public String getStart()
Returns the start value of thisRangeValue- Returns:
-
getEnd
public String getEnd()
Returns the end value of thisRangeValue- Returns:
-
accepts
public static boolean accepts(String value)
-
asString
public String asString()
-
-