Class Year
- java.lang.Object
-
- org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
-
- org.jboss.as.ejb3.timerservice.schedule.attribute.Year
-
public class Year extends IntegerBasedExpression
Represents in the year value part constructed out of aScheduleExpression.getYear()A
Yearcan hold onlyIntegeras its value. The only exception to this being the wildcard (*) value. The various ways in which aYearvalue 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
Fields Modifier and Type Field Description static IntegerMAX_YEARstatic IntegerMIN_YEAR-
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)protected IntegergetMaxValue()Returns the maximum possible value for aYearprotected IntegergetMinValue()Returns the minimum possible value for aYearIntegergetNextMatch(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
-
-
-
-
Constructor Detail
-
Year
public Year(String value)
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 Detail
-
getMaxValue
protected Integer getMaxValue()
Returns the maximum possible value for aYear- Specified by:
getMaxValuein classIntegerBasedExpression- See Also:
MAX_YEAR
-
getMinValue
protected Integer getMinValue()
Returns the minimum possible value for aYear- Specified by:
getMinValuein classIntegerBasedExpression- See Also:
MIN_YEAR
-
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
-
-