Package org.apache.cassandra.utils
Class OverlapIterator<I extends java.lang.Comparable<? super I>,V>
- java.lang.Object
-
- org.apache.cassandra.utils.OverlapIterator<I,V>
-
public class OverlapIterator<I extends java.lang.Comparable<? super I>,V> extends java.lang.Object
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 Constructor Description OverlapIterator(java.util.Collection<Interval<I,V>> intervals)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<V>
overlaps()
void
update(I point)
-