org.ofbiz.service.calendar
Class RecurrenceInfo.RecurrenceWrapper

java.lang.Object
  extended by org.ofbiz.service.calendar.TemporalExpression
      extended by org.ofbiz.service.calendar.RecurrenceInfo.RecurrenceWrapper
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TemporalExpression>
Enclosing class:
RecurrenceInfo

protected static class RecurrenceInfo.RecurrenceWrapper
extends TemporalExpression

Wraps a RecurrenceInfo object with a TemporalExpression object. This class is intended to help with the transition from RecurrenceInfo/RecurrenceRule to TemporalExpression.

See Also:
Serialized Form

Field Summary
protected  RecurrenceInfo info
           
 
Fields inherited from class org.ofbiz.service.calendar.TemporalExpression
id, sequence, subSequence
 
Constructor Summary
protected RecurrenceInfo.RecurrenceWrapper()
           
  RecurrenceInfo.RecurrenceWrapper(RecurrenceInfo info)
           
 
Method Summary
 void accept(TemporalExpressionVisitor visitor)
          Handles a TemporalExpressionVisitor visit.
 java.util.Calendar first(java.util.Calendar cal)
          Returns a date representing the first occurrence of this expression on or after a specified date.
 boolean includesDate(java.util.Calendar cal)
          Returns true if this expression includes the specified date.
 java.util.Calendar next(java.util.Calendar cal)
          Returns a date representing the next occurrence of this expression after a specified date.
 
Methods inherited from class org.ofbiz.service.calendar.TemporalExpression
compareTo, containsExpression, getId, getRange, setId, setStartOfDay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

info

protected RecurrenceInfo info
Constructor Detail

RecurrenceInfo.RecurrenceWrapper

protected RecurrenceInfo.RecurrenceWrapper()

RecurrenceInfo.RecurrenceWrapper

public RecurrenceInfo.RecurrenceWrapper(RecurrenceInfo info)
Method Detail

first

public java.util.Calendar first(java.util.Calendar cal)
Description copied from class: TemporalExpression
Returns a date representing the first occurrence of this expression on or after a specified date. Returns null if there is no matching date.

Specified by:
first in class TemporalExpression
Parameters:
cal - A date to evaluate
Returns:
A Calendar instance representing the first matching date, or null if no matching date is found

includesDate

public boolean includesDate(java.util.Calendar cal)
Description copied from class: TemporalExpression
Returns true if this expression includes the specified date.

Specified by:
includesDate in class TemporalExpression
Parameters:
cal - A date to evaluate
Returns:
true if this expression includes the date represented by cal

next

public java.util.Calendar next(java.util.Calendar cal)
Description copied from class: TemporalExpression
Returns a date representing the next occurrence of this expression after a specified date. Returns null if there is no matching date.

Specified by:
next in class TemporalExpression
Parameters:
cal - A date to evaluate
Returns:
A Calendar instance representing the first matching date, or null if no matching date is found

accept

public void accept(TemporalExpressionVisitor visitor)
Description copied from class: TemporalExpression
Handles a TemporalExpressionVisitor visit.

Specified by:
accept in class TemporalExpression