Class Second
java.lang.Object
org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
org.jboss.as.ejb3.timerservice.schedule.attribute.Second
Represents the value of a second constructed out of a
ScheduleExpression.getSecond()
A Second can hold only Integer as its value. The only exception to this being the wildcard (*)
value. The various ways in which a
Second value can be represented are:
- Wildcard. For example, second = "*"
- Range. For example, second = "0-34"
- List. For example, second = "15, 20, 59"
- Single value. For example, second = "12"
- Increment. For example, second = "* / 5"
- Version:
- $Revision: $
- Author:
- Jaikiran Pai
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegerThe maximum allowed value for a secondstatic final IntegerMinimum allowed value for a secondFields 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 aSecondprotected IntegerReturns the minimum allowed value for aSecondgetNextMatch(int currentSecond) 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
-
MAX_SECOND
The maximum allowed value for a second -
MIN_SECOND
Minimum allowed value for a second
-
-
Constructor Details
-
Second
Creates aSecondby 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
-
getNextMatch
-
getFirst
public int getFirst() -
getMaxValue
Returns the maximum allowed value for aSecond- Specified by:
getMaxValuein classIntegerBasedExpression- See Also:
-
getMinValue
Returns the minimum allowed value for aSecond- 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
-