public class RangeValue extends Object implements ScheduleValue
ScheduleExpression which is expressed as a range type. An
RangeValue comprises 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.
ScheduleExpressionType.RANGE| Modifier and Type | Field and Description |
|---|---|
static String |
RANGE_SEPARATOR
The separator which is used for parsing a
String which
represents a RangeValue |
| Constructor and Description |
|---|
RangeValue(String range)
Creates a
RangeValue by parsing the passed value. |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accepts(String value) |
String |
asString() |
String |
getEnd()
Returns the end value of this
RangeValue |
String |
getStart()
Returns the start value of this
RangeValue |
public static final String RANGE_SEPARATOR
String which
represents a RangeValuepublic RangeValue(String range)
RangeValue by parsing the passed value.
Upon successfully parsing the passed value, this constructor
sets the start and the end value of this RangeValue
range - The value to be parsedIllegalArgumentException - If the passed value cannot be
represented as an RangeValuepublic String getStart()
RangeValuepublic String getEnd()
RangeValuepublic static boolean accepts(String value)
public String asString()
Copyright © 2019 JBoss by Red Hat. All rights reserved.