public class Interval<T extends Comparable<T>> extends Object
Intervals
Constructor and Description |
---|
Interval(T begin,
T end)
Instantiates this interval.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Interval<T> other)
Checks whether another interval is contained in the interval, i.e.,
whether all members of the other interval are also contained in the
interval.
|
boolean |
contains(T object)
Checks whether an object is contained in the interval.
|
boolean |
equals(Object object) |
T |
getBegin()
Returns the begin of this interval.
|
T |
getEnd()
Returns the end of this interval.
|
int |
hashCode() |
public Interval(T begin, T end)
begin
- the beginend
- the endNullPointerException
- if the begin is null
NullPointerException
- if the end is null
IllegalArgumentException
- if the begin does not precede the endpublic T getBegin()
public T getEnd()
public boolean contains(T object)
object
- the object to be checked.true
if the object is contained,
false
otherwisepublic boolean contains(Interval<T> other)
other
- the other interval to be checkedtrue
if the other interval is contained,
false
otherwiseCopyright © Aimpulse Intelligent Systems GmbH
All rights reserved.