Class DayOfMonth
java.lang.Object
org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
org.jboss.as.ejb3.timerservice.schedule.attribute.DayOfMonth
Represents the value of a day in a month, constructed out of a
ScheduleExpression.getDayOfMonth()
A DayOfMonth can hold an Integer or a String as its value.
value. The various ways in which a
DayOfMonth value can be represented are:
- Wildcard. For example, dayOfMonth = "*"
- Range. Examples:
- dayOfMonth = "1-10"
- dayOfMonth = "Sun-Tue"
- dayOfMonth = "1st-5th"
- List. Examples:
- dayOfMonth = "1, 12, 20"
- dayOfMonth = "Mon, Fri, Sun"
- dayOfMonth = "3rd, 1st, Last"
- Single value. Examples:
- dayOfMonth = "Fri"
- dayOfMonth = "Last"
- dayOfMonth = "10"
- Version:
- $Revision: $
- Author:
- Jaikiran Pai
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegerThe maximum allowed value for theDayOfMonthstatic final IntegerThe minimum allowed value for theDayOfMonthstatic final PatternRegex pattern for multiple space charactersFields 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 voidassertValid(Integer value) getFirstMatch(Calendar cal) protected IntegerReturns the maximum allowed value for aDayOfMonthprotected IntegerReturns the minimum allowed value for aDayOfMonthgetNextMatch(Calendar currentCal) booleanisRelativeValue(String value) Checks if relative value is supported.protected IntegerMethods inherited from class org.jboss.as.ejb3.timerservice.schedule.attribute.IntegerBasedExpression
getType, processIncrement, processListItem, processListValue, processRangeValue, processSingleValue
-
Field Details
-
REGEX_SPACES
Regex pattern for multiple space characters -
MAX_DAY_OF_MONTH
The maximum allowed value for theDayOfMonth -
MIN_DAY_OF_MONTH
The minimum allowed value for theDayOfMonth
-
-
Constructor Details
-
DayOfMonth
Creates aDayOfMonthby 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.LIST, norScheduleExpressionType.SINGLE_VALUE.
-
-
Method Details
-
getMaxValue
Returns the maximum allowed value for aDayOfMonth- Specified by:
getMaxValuein classIntegerBasedExpression- See Also:
-
getMinValue
Returns the minimum allowed value for aDayOfMonth- Specified by:
getMinValuein classIntegerBasedExpression- See Also:
-
getNextMatch
-
assertValid
- Overrides:
assertValidin classIntegerBasedExpression- Throws:
IllegalArgumentException
-
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
-
getFirstMatch
-
parseInt
- Overrides:
parseIntin classIntegerBasedExpression
-