public interface TimeExpression
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
void |
accept(java.lang.String timeExpression)
Clears any existing time expression information and uses timeExpression as
the basis for any future operations.
|
AllowableBusinessInterval |
getBusinessInterval()
Returns the optional business interval associated with this time
expression.
|
java.util.TimeZone |
getTimeZone()
Returns the time zone associated with this time expression.
|
java.util.Date |
next()
Returns the next date that satisfies the constraints of this Time
Expression.
|
java.util.Date |
next(java.util.Date after)
Returns the next date that satisfies the constraints of this Time
Expression; the next date comes strictly after the specified date.
|
void |
reset()
Clears any existing time expression information.
|
void |
setBusinessInterval(AllowableBusinessInterval businessInterval)
Registers a Business Interval with this time expression, which is
consulted when the time expression is evaluated, that is, when next() and
next(Date) are called.
|
void |
setTimeZone(java.util.TimeZone timeZone)
Sets the time zone associated with this time expression.
|
void accept(java.lang.String timeExpression) throws EngineException
timeExpression
- The time expression to use as a base.EngineException
- If the time expression is illegal.AllowableBusinessInterval getBusinessInterval()
java.util.TimeZone getTimeZone()
java.util.Date next() throws EngineException
For example, consider the following code.
Date d1 = myTimeExpression.next(); Date d2 = myTimeExpression.next();In the above code, the first call evaluates a time expression relative to the current time. The result is stored in d1. The second call evaluates a time expression relative to d1 and stores the result in d2.
EngineException
- If the time expression does not evaluate correctly.next(Date)
java.util.Date next(java.util.Date after) throws EngineException
For example, consider the following code.
Date d2 = myTimeExpression.next(d1); Date d3 = myTimeExpression.next();In the above code, the first call evaluates a time expression relative to d1. The result is stored in d2. The second call evaluates a Time Expression relative to d2 and stores the result in d3.
after
- The result is strictly later this date.EngineException
- if the time expression does not evaluate correctly.void reset()
void setBusinessInterval(AllowableBusinessInterval businessInterval)
businessInterval
- The BusinessInterval to register.void setTimeZone(java.util.TimeZone timeZone)
timeZone
- The time zone associated with this time expression.© 2000-2025 Flux Corporation. All rights reserved.