Class TreeRangeSet<C extends Comparable<?>>

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      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).
      Set<Range<C>> asDescendingSetOfRanges()
      Returns a descending view of the disconnected ranges that make up this range set.
      Set<Range<C>> asRanges()
      Returns a view of the disconnected ranges that make up this range set.
      void clear()
      Removes all ranges from this RangeSet (optional operation).
      RangeSet<C> complement()
      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>
      create()
      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 enclosesAll​(RangeSet<C> other)
      Returns true if for each member range in other there exists a member range in this range set which encloses it.
      boolean enclosesAll​(Iterable<Range<C>> ranges)
      Returns true if for each range in other there exists a member range in this range set which encloses it.
      boolean equals​(Object obj)
      Returns true if obj is another RangeSet that contains the same ranges according to Range.equals(Object).
      int hashCode()
      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 isEmpty()
      Returns true if this range set contains no ranges.
      Range<C> rangeContaining​(C value)
      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 removeAll​(RangeSet<C> other)
      Removes all of the ranges from the specified range set from this range set (optional operation).
      void removeAll​(Iterable<Range<C>> ranges)
      Removes all of the specified ranges from this range set (optional operation).
      Range<C> span()
      Returns the minimal range which encloses all ranges in this range set.
      RangeSet<C> subRangeSet​(Range<C> view)
      Returns a view of the intersection of this RangeSet with the specified range.
      String toString()
      Returns a readable string representation of this range set.