public class AbsoluteInterval<U extends IntervalUnit> extends Interval<U>
DateUnit.MONTH
from
2014-01-04 to 2014-03-08 will result in an interval
including the whole months of January through March, i.e. from
2014-01-01 to 2014-03-31.Constructor and Description |
---|
AbsoluteInterval(U intervalUnit,
Calendar start,
Calendar end)
Creates a new absolute interval.
|
public AbsoluteInterval(U intervalUnit, Calendar start, Calendar end) throws NullIntervalException, InvalidAbsoluteIntervalException
intervalUnit
- the interval unit to use, indicating date or time and
the highest level of detailstart
- start of the interval, ignoring any parts more detailed than
the interval unitend
- end of the interval, ignoring any parts more detailed than the
interval unitNullIntervalException
- if start, end, or unit are nullInvalidAbsoluteIntervalException
- if the given start is after the
given endpublic Calendar getStart()
public Calendar getEnd()
Copyright © 2014. All rights reserved.