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(Calendar currentCal) |
boolean |
isRelativeValue(String value) |
assertValid, parseInt, processIncrement, processListItem, processListValue, processRangeValue, processSingleValue
public 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()
Hour
getMaxValue
in class IntegerBasedExpression
MAX_HOUR
protected Integer getMinValue()
Hour
getMinValue
in class IntegerBasedExpression
MIN_HOUR
public boolean isRelativeValue(String value)
isRelativeValue
in class IntegerBasedExpression
protected boolean accepts(ScheduleExpressionType scheduleExprType)
accepts
in class IntegerBasedExpression
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.