Class Year
java.lang.Object
org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
org.jboss.as.ejb3.timerservice.schedule.attribute.Year
Represents in the year value part constructed out of a
ScheduleExpression.getYear()
A Year can hold only Integer as its value. The only exception to this being the wildcard (*)
value. The various ways in which a
Year value can be represented are:
- Wildcard. For example, year = "*"
- Range. For example, year = "2009-2011"
- List. For example, year = "2008, 2010, 2011"
- Single value. For example, year = "2009"
- Version:
- $Revision: $
- Author:
- Jaikiran Pai
-
Field Summary
FieldsFields 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) protected IntegerReturns the maximum possible value for aYearprotected IntegerReturns the minimum possible value for aYeargetNextMatch(Calendar currentCal) 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_YEAR
-
MIN_YEAR
-
-
Constructor Details
-
Year
Creates aYearby parsing the passedStringvalueValid values are of type
ScheduleExpressionType.WILDCARD,ScheduleExpressionType.RANGE,ScheduleExpressionType.LISTorScheduleExpressionType.SINGLE_VALUE- Parameters:
value- The value to be parsed- Throws:
IllegalArgumentException- If the passedvalueis neither aScheduleExpressionType.WILDCARD,ScheduleExpressionType.RANGE,ScheduleExpressionType.LISTnorScheduleExpressionType.SINGLE_VALUE
-
-
Method Details
-
getMaxValue
Returns the maximum possible value for aYear- Specified by:
getMaxValuein classIntegerBasedExpression- See Also:
-
getMinValue
Returns the minimum possible value for aYear- 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
-