Package org.apache.cassandra.utils
Class OverlapIterator<I extends Comparable<? super I>,V>
java.lang.Object
org.apache.cassandra.utils.OverlapIterator<I,V>
A class for iterating sequentially through an ordered collection and efficiently
finding the overlapping set of matching intervals.
The algorithm is quite simple: the intervals are sorted ascending by both min and max
in two separate lists. These lists are walked forwards each time we visit a new point,
with the set of intervals in the min-ordered list being added to our set of overlaps,
and those in the max-ordered list being removed.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OverlapIterator
-
-
Method Details
-
update
-
overlaps
-