Class Hour
java.lang.Object
org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
org.jboss.as.ejb3.timerservice.schedule.attribute.Hour
Represents the value of a hour constructed out of a
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:
- Wildcard. For example, hour = "*"
- Range. For example, hour = "0-23"
- List. For example, hour = "1, 12, 20"
- Single value. For example, hour = "5"
- Increment. For example, hour = "0 / 3"
- Version:
- $Revision: $
- Author:
- Jaikiran Pai
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegerMaximum allowed value for aHourstatic final IntegerMinimum allowed value for aHourFields inherited from class org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
absoluteValues, origValue, relativeValues, scheduleExpressionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaccepts(ScheduleExpressionType scheduleExprType) intgetFirst()protected IntegerReturns the maximum allowed value for aHourprotected IntegerReturns the minimum allowed value for aHourgetNextMatch(int currentHour) booleanisRelativeValue(String value) Checks if relative value is supported.Methods inherited from class org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
assertValid, getType, parseInt, processIncrement, processListItem, processListValue, processRangeValue, processSingleValue
-
Field Details
-
Constructor Details
-
Hour
Creates aHourby parsing the passedStringvalueValid values are of type
ScheduleExpressionType.WILDCARD,ScheduleExpressionType.RANGE,ScheduleExpressionType.LISTScheduleExpressionType.INCREMENTorScheduleExpressionType.SINGLE_VALUE- Parameters:
value- The value to be parsed- Throws:
IllegalArgumentException- If the passedvalueis neither aScheduleExpressionType.WILDCARD,ScheduleExpressionType.RANGE,ScheduleExpressionType.LIST,ScheduleExpressionType.INCREMENTnorScheduleExpressionType.SINGLE_VALUE.
-
-
Method Details
-
getFirst
public int getFirst() -
getMaxValue
Returns the maximum allowed value for aHour- Specified by:
getMaxValuein classIntegerBasedExpression- See Also:
-
getMinValue
Returns the minimum allowed value for aHour- Specified by:
getMinValuein classIntegerBasedExpression- See Also:
-
isRelativeValue
Description copied from class:IntegerBasedExpressionChecks if relative value is supported.- Specified by:
isRelativeValuein classIntegerBasedExpression- Parameters:
value- non-null value- Returns:
- true if relative value is supported
-
accepts
- Specified by:
acceptsin classIntegerBasedExpression
-
getNextMatch
-