org.apache.cassandra.db.commitlog

## Class IntervalSet.Builder<T extends java.lang.Comparable<T>>

- java.lang.Object
- - org.apache.cassandra.db.commitlog.IntervalSet.Builder<T>

Enclosing class:
  IntervalSet<T extends java.lang.Comparable<T>>

    public static class IntervalSet.Builder<T extends java.lang.Comparable<T>>
    extends java.lang.Object

Builder of interval sets, applying the necessary normalization while adding ranges. Data is stored as above, as a sorted map from interval starts to the corresponding end, which satisfies `curr().getKey() <= curr().getValue() < next().getKey()`

### Constructor Summary

Constructors
Constructor and Description
`Builder()`
`Builder(T start, T end)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add(T start, T end)` Add an interval to the set and perform normalization.
`void` `addAll(IntervalSet<T> otherSet)`
`IntervalSet<T>` `build()`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Builder

    public Builder()

#### Builder

    public Builder(T start,
                   T end)

### Method Detail

#### add

    public void add(T start,
                    T end)

Add an interval to the set and perform normalization.

#### addAll

    public void addAll(IntervalSet<T> otherSet)

#### build

    public IntervalSet<T> build()