Class RangeValue

  • All Implemented Interfaces:
    ScheduleValue

    public class RangeValue
    extends Object
    implements ScheduleValue
    Represents a value for a 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.

    Version:
    $Revision: $
    Author:
    Jaikiran Pai
    See Also:
    ScheduleExpressionType.RANGE
    • Constructor Detail

      • RangeValue

        public RangeValue​(String range)
        Creates a RangeValue by parsing the passed value.

        Upon successfully parsing the passed value, this constructor sets the start and the end value of this RangeValue

        Parameters:
        range - The value to be parsed
        Throws:
        IllegalArgumentException - If the passed value cannot be represented as an RangeValue
    • Method Detail

      • getStart

        public String getStart()
        Returns the start value of this RangeValue
        Returns:
      • getEnd

        public String getEnd()
        Returns the end value of this RangeValue
        Returns:
      • accepts

        public static boolean accepts​(String value)
      • asString

        public String asString()