|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.objects.keys.KeyInterval<T>
T
- specific type of the keypublic abstract class KeyInterval<T>
Closed interval, comparable by the lower bound.
Constructor Summary | |
---|---|
KeyInterval()
|
Method Summary | |
---|---|
java.util.List<KeyInterval<T>> |
cutIntersectingIntervals(java.util.List<KeyInterval<T>> intervals,
KeyOperator<T> operator)
Given a list of intervals, cut from them the parts that intersects with "this" interval. |
protected java.util.List<KeyInterval<T>> |
cutIntersectingIntervalsInner(java.util.List<KeyInterval<T>> intervals,
KeyOperator<T> operator)
Given a list of intervals, cut from them the parts that intersects with "this" interval. |
boolean |
equals(java.lang.Object obj)
|
abstract T |
getFrom()
Return the lower bound of the interval. |
abstract T |
getTo()
Return the upper bound of the interval. |
int |
hashCode()
|
boolean |
intersect(KeyInterval<T> interval,
KeyOperator<T> operator)
Return true if the interval intersects with this interval. |
boolean |
isCovered(T key,
KeyOperator<T> operator)
Return true if the interval covers given key. |
java.lang.String |
toString()
Return the string representation of this interval. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Constructor Detail |
---|
public KeyInterval()
Method Detail |
---|
public abstract T getFrom()
public abstract T getTo()
public final boolean isCovered(T key, KeyOperator<T> operator)
key
- the key to be testedoperator
- the operator fot this key type
public final boolean intersect(KeyInterval<T> interval, KeyOperator<T> operator)
interval
- the interval to be testedoperator
- the operator fot this key type
public java.util.List<KeyInterval<T>> cutIntersectingIntervals(java.util.List<KeyInterval<T>> intervals, KeyOperator<T> operator)
intervals
- list of intervalsoperator
- the operator fot this key type
protected java.util.List<KeyInterval<T>> cutIntersectingIntervalsInner(java.util.List<KeyInterval<T>> intervals, KeyOperator<T> operator)
intervals
- list of intervalsoperator
- the operator fot this key type
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |