Package com.google.common.collect
Class TreeRangeSet.Complement
java.lang.Object
com.google.common.collect.AbstractRangeSet<C>
com.google.common.collect.TreeRangeSet<C>
com.google.common.collect.TreeRangeSet.Complement
- All Implemented Interfaces:
RangeSet<C>
,Serializable
- Enclosing class:
TreeRangeSet<C extends Comparable<?>>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.collect.TreeRangeSet
TreeRangeSet.AsRanges, TreeRangeSet.RangesByUpperBound<C extends Comparable<?>>
-
Field Summary
Fields inherited from class com.google.common.collect.TreeRangeSet
rangesByLowerBound
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the specified range to thisRangeSet
(optional operation).Returns a view of the complement of thisRangeSet
.boolean
Determines whether any of this range set's member ranges containsvalue
.void
Removes the specified range from thisRangeSet
(optional operation).Methods inherited from class com.google.common.collect.TreeRangeSet
asDescendingSetOfRanges, asRanges, create, create, create, encloses, intersects, rangeContaining, span, subRangeSet
Methods inherited from class com.google.common.collect.AbstractRangeSet
addAll, clear, enclosesAll, equals, hashCode, isEmpty, removeAll, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.common.collect.RangeSet
addAll, enclosesAll, removeAll
-
Constructor Details
-
Complement
Complement()
-
-
Method Details
-
add
Description copied from interface:RangeSet
Adds the specified range to thisRangeSet
(optional operation). That is, for equal range sets a and b, the result ofa.add(range)
is thata
will be the minimal range set for which botha.enclosesAll(b)
anda.encloses(range)
.Note that
range
will be coalesced with any ranges in the range set that are connected with it. Moreover, ifrange
is empty, this is a no-op.- Specified by:
add
in interfaceRangeSet<C extends Comparable<?>>
- Overrides:
add
in classTreeRangeSet<C extends Comparable<?>>
-
remove
Description copied from interface:RangeSet
Removes the specified range from thisRangeSet
(optional operation). After this operation, ifrange.contains(c)
,this.contains(c)
will returnfalse
.If
range
is empty, this is a no-op.- Specified by:
remove
in interfaceRangeSet<C extends Comparable<?>>
- Overrides:
remove
in classTreeRangeSet<C extends Comparable<?>>
-
contains
Description copied from interface:RangeSet
Determines whether any of this range set's member ranges containsvalue
.- Specified by:
contains
in interfaceRangeSet<C extends Comparable<?>>
- Overrides:
contains
in classAbstractRangeSet<C extends Comparable<?>>
-
complement
Description copied from interface:RangeSet
Returns a view of the complement of thisRangeSet
.The returned view supports the
RangeSet.add(com.google.common.collect.Range<C>)
operation if thisRangeSet
supportsRangeSet.remove(com.google.common.collect.Range<C>)
, and vice versa.- Specified by:
complement
in interfaceRangeSet<C extends Comparable<?>>
- Overrides:
complement
in classTreeRangeSet<C extends Comparable<?>>
-