public class Intervals<T extends Comparable<T>> extends Object
Interval
Constructor and Description |
---|
Intervals(Interval<T> interval)
Instantiates a singleton set of intervals from an interval.
|
Intervals(T preferredBegin,
T leastAcceptableBegin,
T preferredEnd,
T leastAcceptableEnd)
Instantiates this set of intervals.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Interval<T> interval)
Checks whether an interval is covered by this set of intervals
|
T |
getLeastAcceptableBegin()
Returns the least acceptable begin.
|
T |
getLeastAcceptableEnd()
Returns the least acceptable end.
|
T |
getPreferredBegin()
Returns the preferred begin.
|
T |
getPreferredEnd()
Returns the preferred end.
|
boolean |
hasFixedBegin()
Checks whether the begin is fixed.
|
boolean |
hasFixedEnd()
Checks whether the end is fixed.
|
boolean |
isFixed()
Checks whether both begin and end are fixed.
|
public Intervals(Interval<T> interval)
interval
- the only interval contained in the setpublic Intervals(T preferredBegin, T leastAcceptableBegin, T preferredEnd, T leastAcceptableEnd)
preferredBegin
- the preferred beginleastAcceptableBegin
- the least acceptable beginpreferredEnd
- the preferred endleastAcceptableEnd
- the least acceptable endNullPointerException
- if the preferred begin is null
NullPointerException
- if the least acceptable begin begin is null
NullPointerException
- if the preferred end is null
NullPointerException
- if the least acceptable end is null
IllegalArgumentException
- if the minimum of the possible ends is less or equal the
minimum of possible beginsIllegalArgumentException
- if the maximum of the possible begins is less or equal the
maximum of possible endspublic T getPreferredBegin()
public T getLeastAcceptableBegin()
public T getPreferredEnd()
public T getLeastAcceptableEnd()
public boolean hasFixedBegin()
true
if the begin is fixed, false
otherwisepublic boolean hasFixedEnd()
true
if the end is fixed, false
otherwisepublic boolean isFixed()
true
if both begin and end are fixed,
false
otherwiseCopyright © Aimpulse Intelligent Systems GmbH
All rights reserved.