Class Second
- java.lang.Object
-
- org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
-
- org.jboss.as.ejb3.timerservice.schedule.attribute.Second
-
public class Second extends IntegerBasedExpression
Represents the value of a second constructed out of aScheduleExpression.getSecond()A
Secondcan hold onlyIntegeras its value. The only exception to this being the wildcard (*) value. The various ways in which aSecondvalue 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
Fields Modifier and Type Field Description static IntegerMAX_SECONDThe maximum allowed value for a secondstatic IntegerMIN_SECONDMinimum allowed value for a second-
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 aSecondprotected IntegergetMinValue()Returns the minimum allowed value for aSecondIntegergetNextMatch(int currentSecond)booleanisRelativeValue(String value)Checks if relative value is supported.-
Methods inherited from class org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
assertValid, parseInt, processIncrement, processListItem, processListValue, processRangeValue, processSingleValue
-
-
-
-
Constructor Detail
-
Second
public Second(String value)
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 Detail
-
getNextMatch
public Integer getNextMatch(int currentSecond)
-
getFirst
public int getFirst()
-
getMaxValue
protected Integer getMaxValue()
Returns the maximum allowed value for aSecond- Specified by:
getMaxValuein classIntegerBasedExpression- See Also:
MAX_SECOND
-
getMinValue
protected Integer getMinValue()
Returns the minimum allowed value for aSecond- Specified by:
getMinValuein classIntegerBasedExpression- See Also:
MIN_SECOND
-
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
-
-