public class Hour extends IntegerBasedExpression
ScheduleExpression.getHour()
A Hour can hold only Integer as its value. The only exception to this being the wildcard (*)
value. The various ways in which a
Hour value can be represented are:
| Modifier and Type | Field and Description |
|---|---|
static Integer |
MAX_HOUR
Maximum allowed value for a
Hour |
static Integer |
MIN_HOUR
Minimum allowed value for a
Hour |
absoluteValues, origValue, relativeValues, scheduleExpressionType| Modifier and Type | Method and Description |
|---|---|
protected boolean |
accepts(ScheduleExpressionType scheduleExprType) |
int |
getFirst() |
protected Integer |
getMaxValue()
Returns the maximum allowed value for a
Hour |
protected Integer |
getMinValue()
Returns the minimum allowed value for a
Hour |
Integer |
getNextMatch(int currentHour) |
boolean |
isRelativeValue(String value) |
assertValid, parseInt, processIncrement, processListItem, processListValue, processRangeValue, processSingleValuepublic Hour(String value)
Hour by parsing the passed String value
Valid values are of type ScheduleExpressionType.WILDCARD, ScheduleExpressionType.RANGE,
ScheduleExpressionType.LIST ScheduleExpressionType.INCREMENT or
ScheduleExpressionType.SINGLE_VALUE
value - The value to be parsedIllegalArgumentException - If the passed value is neither a ScheduleExpressionType.WILDCARD,
ScheduleExpressionType.RANGE, ScheduleExpressionType.LIST,
ScheduleExpressionType.INCREMENT nor ScheduleExpressionType.SINGLE_VALUE.public int getFirst()
protected Integer getMaxValue()
HourgetMaxValue in class IntegerBasedExpressionMAX_HOURprotected Integer getMinValue()
HourgetMinValue in class IntegerBasedExpressionMIN_HOURpublic boolean isRelativeValue(String value)
isRelativeValue in class IntegerBasedExpressionprotected boolean accepts(ScheduleExpressionType scheduleExprType)
accepts in class IntegerBasedExpressionpublic Integer getNextMatch(int currentHour)
Copyright © 2020 JBoss by Red Hat. All rights reserved.