private final class TreeRangeSet.Complement extends TreeRangeSet<C>
TreeRangeSet.AsRanges, TreeRangeSet.RangesByUpperBound<C extends java.lang.Comparable<?>>rangesByLowerBound| Constructor and Description |
|---|
Complement() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Range<C> rangeToAdd)
Adds the specified range to 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. |
void |
remove(Range<C> rangeToRemove)
Removes the specified range from this
RangeSet (optional operation). |
asDescendingSetOfRanges, asRanges, create, create, create, encloses, intersects, rangeContaining, span, subRangeSetaddAll, clear, enclosesAll, equals, hashCode, isEmpty, removeAll, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, enclosesAll, removeAllpublic void add(Range<C> rangeToAdd)
RangeSetRangeSet (optional operation). That is, for equal
range sets a and b, the result of a.add(range) is that a will be the minimal
range set for which both a.enclosesAll(b) and a.encloses(range).
Note that range will be coalesced with any ranges in
the range set that are connected with it. Moreover, if
range is empty, this is a no-op.
public void remove(Range<C> rangeToRemove)
RangeSetRangeSet (optional operation). After this
operation, if range.contains(c), this.contains(c) will return false.
If range is empty, this is a no-op.
public boolean contains(C value)
RangeSetvalue.public RangeSet<C> complement()
RangeSetRangeSet.
The returned view supports the RangeSet.add(com.google.common.collect.Range<C>) operation if this RangeSet supports
RangeSet.remove(com.google.common.collect.Range<C>), and vice versa.
complement in interface RangeSet<C extends java.lang.Comparable<?>>complement in class TreeRangeSet<C extends java.lang.Comparable<?>>