Class Interval
java.lang.Object
org.opencastproject.metadata.api.util.Interval
An interval in time, possibly unbounded on one end.
The interval is described by its bounds which are absolutely placed instants in time with a precision
defined by
Date.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic IntervalboundedInterval(Date leftBound, Date rightBound) Constructor function for a bounded interval.abstract <A> Afold(Interval.Match<A> visitor) Safe decomposition.static IntervalfromValues(Date leftBound, Date rightBound) Create an interval from two dates.booleanTest if both endpoints are not infinite.abstract booleanTest if the right endpoint is infinite.abstract booleanTest if the left endpoint is infinite.static IntervalleftBoundedInterval(Date leftBound) Constructor function for a left bounded interval, i.e. an interval with an infinite right endpoint.static IntervalrightBoundedInterval(Date rightBound) Constructor function for a right bounded interval, i.e. an interval with an infinite left endpoint.
-
Method Details
-
boundedInterval
Constructor function for a bounded interval. -
rightBoundedInterval
Constructor function for a right bounded interval, i.e. an interval with an infinite left endpoint. -
leftBoundedInterval
Constructor function for a left bounded interval, i.e. an interval with an infinite right endpoint. -
fromValues
Create an interval from two dates. One of the dates may be null to indicate an infinite endpoint.- Throws:
IllegalArgumentException- if boths bounds are null
-
isBounded
public boolean isBounded()Test if both endpoints are not infinite. -
isLeftInfinite
public abstract boolean isLeftInfinite()Test if the right endpoint is infinite. -
isRightInfinite
public abstract boolean isRightInfinite()Test if the left endpoint is infinite. -
fold
Safe decomposition.
-