K - the interval typepublic interface Interval<K>
Object.equals(Object) and Object.hashCode() based on
the bounds.| Modifier and Type | Method and Description |
|---|---|
int |
compareUpperBound(K that)
Compare two intervals based on their upper-bounds.
|
boolean |
contains(K that)
Tests if this interval contains
that. |
boolean |
intersects(K that)
Tests if these two intervals intersect.
|
K |
singletonIntervalAtLowerBound()
Copies this interval into a new interval that has both its lower and
upper-bound set to the original's lower-bound.
|
boolean contains(K that)
that. Note that if two
intervals are equal, they also contain each other (and vice
versa). An interval always contains itself.that - the interval to test for containmentthis contains that intervalboolean intersects(K that)
that - the other interval to test for intersectionthis interval intersects that
intervalK singletonIntervalAtLowerBound()
Interval a = ... Interval b = ... if (a.singletonIntervalAtLowerBound().compareUpperBoundTo(b) < 0) ...
int compareUpperBound(K that)
NestedIntervalMap implementation to quickly find two potentially
intersecting intervals by ordering intervals on the upper-bound and
searching based on the lower-bound.that - the interval to compare the upper-bound withCopyright © 2022. All rights reserved.