public class Interval<T> extends Object implements Serializable, Comparable<Interval<T>>
IntervalArray.| Constructor and Description |
|---|
Interval(int begin,
int end,
T value,
int maxEnd) |
Interval(MutableInterval<T> other) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allLeftOf(int point) |
int |
compareTo(Interval<T> o) |
boolean |
contains(int point) |
boolean |
equals(Object obj) |
int |
getBegin() |
int |
getEnd() |
int |
getMaxEnd() |
T |
getValue() |
int |
hashCode() |
boolean |
isLeftOf(int point) |
boolean |
isRightOf(int point) |
boolean |
overlapsWith(int begin,
int end) |
String |
toString() |
public Interval(MutableInterval<T> other)
public Interval(int begin,
int end,
T value,
int maxEnd)
public int getBegin()
public int getEnd()
public T getValue()
public int getMaxEnd()
public boolean allLeftOf(int point)
true if point is right of maxEnd.public boolean isLeftOf(int point)
true if point is right of this interval.public boolean isRightOf(int point)
true if point is left of this interval.public boolean contains(int point)
true if this intervals contains the given point.public boolean overlapsWith(int begin,
int end)
true if this interval overlaps with [begin, end).public int compareTo(Interval<T> o)
compareTo in interface Comparable<Interval<T>>Copyright © 2016. All rights reserved.