IntervalTree (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.utils

## Class IntervalTree<C,D,I extends Interval<C,D>>

- java.lang.Object
- - org.apache.cassandra.utils.IntervalTree<C,D,I>

- All Implemented Interfaces:
    java.lang.Iterable<I>
  Direct Known Subclasses:
    DataTracker.SSTableIntervalTree

      public class IntervalTree<C,D,I extends Interval<C,D>>
      extends java.lang.Object
      implements java.lang.Iterable<I>

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `IntervalTree.Serializer<C,D,I extends Interval<C,D>>`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `IntervalTree(java.util.Collection<I> intervals, java.util.Comparator<C> comparator)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <C extends java.lang.Comparable<C>,D,I extends Interval<C,D>> IntervalTree<C,D,I>` | `build(java.util.Collection<I> intervals)`
    `static <C,D,I extends Interval<C,D>> IntervalTree<C,D,I>` | `build(java.util.Collection<I> intervals, java.util.Comparator<C> comparator)`
    `java.util.Comparator<C>` | `comparator()`
    `static <C,D,I extends Interval<C,D>> IntervalTree<C,D,I>` | `emptyTree()`
    `boolean` | `equals(java.lang.Object o)`
    `int` | `hashCode()`
    `int` | `intervalCount()`
    `boolean` | `isEmpty()`
    `java.util.Iterator<I>` | `iterator()`
    `C` | `max()`
    `C` | `min()`
    `java.util.List<D>` | `search(C point)`
    `java.util.List<D>` | `search(Interval<C,D> searchInterval)`
    `static <C,D,I extends Interval<C,D>> IntervalTree.Serializer<C,D,I>` | `serializer(ISerializer<C> pointSerializer, ISerializer<D> dataSerializer, java.lang.reflect.Constructor<I> constructor)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### IntervalTree

          protected IntervalTree(java.util.Collection<I> intervals,
                      java.util.Comparator<C> comparator)

  - ### Method Detail

    - #### build

          public static <C,D,I extends Interval<C,D>> IntervalTree<C,D,I> build(java.util.Collection<I> intervals,
                                                                java.util.Comparator<C> comparator)

    - #### build

          public static <C extends java.lang.Comparable<C>,D,I extends Interval<C,D>> IntervalTree<C,D,I> build(java.util.Collection<I> intervals)

    - #### serializer

          public static <C,D,I extends Interval<C,D>> IntervalTree.Serializer<C,D,I> serializer(ISerializer<C> pointSerializer,
                                                                                ISerializer<D> dataSerializer,
                                                                                java.lang.reflect.Constructor<I> constructor)

    - #### emptyTree

          public static <C,D,I extends Interval<C,D>> IntervalTree<C,D,I> emptyTree()

    - #### comparator

          public java.util.Comparator<C> comparator()

    - #### intervalCount

          public int intervalCount()

    - #### isEmpty

          public boolean isEmpty()

    - #### max

          public C max()

    - #### min

          public C min()

    - #### search

          public java.util.List<D> search(Interval<C,D> searchInterval)

    - #### search

          public java.util.List<D> search(C point)

    - #### iterator

          public java.util.Iterator<I> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<I extends Interval<C,D>>`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

Copyright © 2014 The Apache Software Foundation