org.ofbiz.service.calendar
Class TemporalExpressions.TimeOfDayRange
java.lang.Object
org.ofbiz.service.calendar.TemporalExpression
org.ofbiz.service.calendar.TemporalExpressions.TimeOfDayRange
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<TemporalExpression>
- Enclosing class:
- TemporalExpressions
public static class TemporalExpressions.TimeOfDayRange
- extends TemporalExpression
A temporal expression that represents a time of day range.
- See Also:
- Serialized Form
Method Summary |
void |
accept(TemporalExpressionVisitor visitor)
Handles a TemporalExpressionVisitor visit. |
boolean |
equals(java.lang.Object obj)
|
java.util.Calendar |
first(java.util.Calendar cal)
Returns a date representing the first occurrence of this expression
on or after a specified date. |
int |
getCount()
|
int |
getEndHours()
|
int |
getEndMins()
|
int |
getEndSecs()
|
int |
getInterval()
|
int |
getStartHours()
|
int |
getStartMins()
|
int |
getStartSecs()
|
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. |
protected java.util.Calendar |
setCalendar(java.util.Calendar cal,
int hrs,
int mins,
int secs)
|
protected java.util.Calendar |
setEnd(java.util.Calendar cal)
|
protected java.util.Calendar |
setStart(java.util.Calendar cal)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
startStr
protected final java.lang.String startStr
endStr
protected final java.lang.String endStr
interval
protected final int interval
count
protected final int count
startSecs
protected final int startSecs
startMins
protected final int startMins
startHrs
protected final int startHrs
endSecs
protected final int endSecs
endMins
protected final int endMins
endHrs
protected final int endHrs
TemporalExpressions.TimeOfDayRange
public TemporalExpressions.TimeOfDayRange(java.lang.String start,
java.lang.String end,
int interval,
int count)
- Parameters:
start
- A time String in the form of hh:mm:ss (24 hr clock)end
- A time String in the form of hh:mm:ss (24 hr clock)interval
- The range interval - must be one of
Calendar.SECOND Calendar.MINUTE Calendar.HOUR_OF_DAY
count
- The interval count - must be greater than zero
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
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
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
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
getCount
public int getCount()
getEndHours
public int getEndHours()
getEndMins
public int getEndMins()
getEndSecs
public int getEndSecs()
getInterval
public int getInterval()
getStartHours
public int getStartHours()
getStartMins
public int getStartMins()
getStartSecs
public int getStartSecs()
accept
public void accept(TemporalExpressionVisitor visitor)
- Description copied from class:
TemporalExpression
- Handles a
TemporalExpressionVisitor
visit.
- Specified by:
accept
in class TemporalExpression
setCalendar
protected java.util.Calendar setCalendar(java.util.Calendar cal,
int hrs,
int mins,
int secs)
setStart
protected java.util.Calendar setStart(java.util.Calendar cal)
setEnd
protected java.util.Calendar setEnd(java.util.Calendar cal)