Class Hour
- java.lang.Object
-
- org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
-
- org.jboss.as.ejb3.timerservice.schedule.attribute.Hour
-
public class Hour extends IntegerBasedExpression
Represents the value of a hour constructed out of aScheduleExpression.getHour()A
Hourcan hold onlyIntegeras its value. The only exception to this being the wildcard (*) value. The various ways in which aHourvalue 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
Fields Modifier and Type Field Description static IntegerMAX_HOURMaximum allowed value for aHourstatic IntegerMIN_HOURMinimum allowed value for aHour-
Fields inherited from class org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
absoluteValues, origValue, relativeValues, scheduleExpressionType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanaccepts(ScheduleExpressionType scheduleExprType)intgetFirst()protected IntegergetMaxValue()Returns the maximum allowed value for aHourprotected IntegergetMinValue()Returns the minimum allowed value for aHourIntegergetNextMatch(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
-
-
-
-
Constructor Detail
-
Hour
public Hour(String value)
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 Detail
-
getFirst
public int getFirst()
-
getMaxValue
protected Integer getMaxValue()
Returns the maximum allowed value for aHour- Specified by:
getMaxValuein classIntegerBasedExpression- See Also:
MAX_HOUR
-
getMinValue
protected Integer getMinValue()
Returns the minimum allowed value for aHour- Specified by:
getMinValuein classIntegerBasedExpression- See Also:
MIN_HOUR
-
isRelativeValue
public boolean isRelativeValue(String value)
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
protected boolean accepts(ScheduleExpressionType scheduleExprType)
- Specified by:
acceptsin classIntegerBasedExpression
-
getNextMatch
public Integer getNextMatch(int currentHour)
-
-