org.apache.myfaces.custom.schedule.model
Class HalfHourInterval
java.lang.Object
org.apache.myfaces.custom.schedule.model.Interval
org.apache.myfaces.custom.schedule.model.HalfHourInterval
- All Implemented Interfaces:
- Serializable, Comparable
public class HalfHourInterval
- extends Interval
This class represents an interval of up to half an hour.
The interval will always round up to the next half hour
e.g. a start time of 14:15 will generate an interval with
end time of 14:30.
- Since:
- 1.1.7
- Version:
- $Revision: 371736 $
- Author:
- Peter Mahoney
- See Also:
- Serialized Form
Method Summary |
static Interval |
next(Interval interval,
Date maxEnd)
Create a new half hour interval following on from the supplied interval. |
Methods inherited from class org.apache.myfaces.custom.schedule.model.Interval |
after, compareTo, containsDate, equals, getDuration, getEndTime, getLabel, getStartHours, getStartMinutes, getStartTime, hashCode, isEquivalent, setEndTime, setLabel, setStartTime, toString |
HALF_HOUR
public static final long HALF_HOUR
- See Also:
- Constant Field Values
HalfHourInterval
public HalfHourInterval(Date startTime,
Date maxEnd)
next
public static Interval next(Interval interval,
Date maxEnd)
- Create a new half hour interval following on from the supplied interval.
The interval will be anything up to half an hour, depending on when the
end of the previous interval was. If an interval cannot be fitted between
the end of the last interval and the maximum end time, null will be returned.
- Parameters:
interval
- The previous intervalmaxEnd
- The maximum end time of the new interval
- Returns:
- The next half hour interval
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.