Class TreeRangeSet<C extends Comparable<?>>

java.lang.Object
com.google.common.collect.TreeRangeSet<C>
All Implemented Interfaces:
RangeSet<C>, Serializable

@GwtIncompatible public class TreeRangeSet<C extends Comparable<?>> extends Object implements Serializable
An implementation of RangeSet backed by a TreeMap.
Since:
14.0
Author:
Louis Wasserman
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Range<C> rangeToAdd)
    Adds the specified range to this RangeSet (optional operation).
    void
    addAll(RangeSet<C> other)
    Adds all of the ranges from the specified range set to this range set (optional operation).
    void
    addAll(Iterable<Range<C>> ranges)
    Adds all of the specified ranges to this range set (optional operation).
    Returns a descending view of the disconnected ranges that make up this range set.
    Returns a view of the disconnected ranges that make up this range set.
    void
    Removes all ranges from this RangeSet (optional operation).
    Returns a view of the complement of this RangeSet.
    boolean
    contains(C value)
    Determines whether any of this range set's member ranges contains value.
    static <C extends Comparable<?>>
    TreeRangeSet<C>
    Creates an empty TreeRangeSet instance.
    static <C extends Comparable<?>>
    TreeRangeSet<C>
    create(RangeSet<C> rangeSet)
    Returns a TreeRangeSet initialized with the ranges in the specified range set.
    static <C extends Comparable<?>>
    TreeRangeSet<C>
    create(Iterable<Range<C>> ranges)
    Returns a TreeRangeSet representing the union of the specified ranges.
    boolean
    encloses(Range<C> range)
    Returns true if there exists a member range in this range set which encloses the specified range.
    boolean
    Returns true if for each member range in other there exists a member range in this range set which encloses it.
    boolean
    Returns true if for each range in other there exists a member range in this range set which encloses it.
    boolean
    Returns true if obj is another RangeSet that contains the same ranges according to Range.equals(Object).
    final int
    Returns asRanges().hashCode().
    boolean
    intersects(Range<C> range)
    Returns true if there exists a non-empty range enclosed by both a member range in this range set and the specified range.
    boolean
    Returns true if this range set contains no ranges.
    Returns the unique range from this range set that contains value, or null if this range set does not contain value.
    void
    remove(Range<C> rangeToRemove)
    Removes the specified range from this RangeSet (optional operation).
    void
    Removes all of the ranges from the specified range set from this range set (optional operation).
    void
    Removes all of the specified ranges from this range set (optional operation).
    Returns the minimal range which encloses all ranges in this range set.
    Returns a view of the intersection of this RangeSet with the specified range.
    final String
    Returns a readable string representation of this range set.

    Methods inherited from class java.lang.Object

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