Class OverlapIterator<I extends Comparable<? super I>,V>

java.lang.Object
org.apache.cassandra.utils.OverlapIterator<I,V>

public class OverlapIterator<I extends Comparable<? super I>,V> extends 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 Details

  • Method Details

    • update

      public void update(I point)
    • overlaps

      public Set<V> overlaps()