public static class TemporalExpressions.DateRange extends TemporalExpression
TemporalExpression.ExpressionContext
Modifier and Type | Field and Description |
---|---|
static String |
module |
protected DateRange |
range |
id, sequence
Constructor and Description |
---|
DateRange(Date date) |
DateRange(Date start,
Date end) |
Modifier and Type | Method and Description |
---|---|
void |
accept(TemporalExpressionVisitor visitor)
Handles a
TemporalExpressionVisitor visit. |
boolean |
equals(Object obj) |
com.ibm.icu.util.Calendar |
first(com.ibm.icu.util.Calendar cal)
Returns a date representing the first occurrence of this expression
on or after a specified date.
|
DateRange |
getDateRange()
Returns the contained
org.apache.ofbiz.base.util.DateRange . |
int |
hashCode() |
boolean |
includesDate(com.ibm.icu.util.Calendar cal)
Returns true if this expression includes the specified date.
|
boolean |
isSubstitutionCandidate(com.ibm.icu.util.Calendar cal,
TemporalExpression expressionToTest)
Returns true if this expression is a candidate for substitution
using the expression
expressionToTest for the date
cal . |
com.ibm.icu.util.Calendar |
next(com.ibm.icu.util.Calendar cal,
TemporalExpression.ExpressionContext context) |
String |
toString() |
compareTo, containsExpression, getId, getRange, next, setId
public DateRange(Date date)
public void accept(TemporalExpressionVisitor visitor)
TemporalExpression
TemporalExpressionVisitor
visit.accept
in class TemporalExpression
public int hashCode()
hashCode
in class TemporalExpression
public boolean equals(Object obj)
equals
in class TemporalExpression
public com.ibm.icu.util.Calendar first(com.ibm.icu.util.Calendar cal)
TemporalExpression
null
if there
is no matching date.first
in class TemporalExpression
cal
- A date to evaluatenull
if no matching date is foundpublic DateRange getDateRange()
org.apache.ofbiz.base.util.DateRange
.org.apache.ofbiz.base.util.DateRange
public boolean includesDate(com.ibm.icu.util.Calendar cal)
TemporalExpression
includesDate
in class TemporalExpression
cal
- A date to evaluatecal
public boolean isSubstitutionCandidate(com.ibm.icu.util.Calendar cal, TemporalExpression expressionToTest)
TemporalExpression
expressionToTest
for the date
cal
. A Substitution
object will call this
method when it needs to know if this expression could have produced
the date cal
based on the expression
expressionToTest
.isSubstitutionCandidate
in class TemporalExpression
cal
- A date to evaluateexpressionToTest
- An expression to evaluatecal
using the expression expressionToTest
public com.ibm.icu.util.Calendar next(com.ibm.icu.util.Calendar cal, TemporalExpression.ExpressionContext context)
next
in class TemporalExpression
public String toString()
toString
in class TemporalExpression