Constructs a new RangeSet, which can store numeric ranges. Ranges are treated as half-closed: that is, they are exclusive of their end value [start, end). New ranges added to the set which overlap the values in one or more existing ranges will be merged.
| Instance Method Summary | |
__iterator__(boolean= opt_keys) ⇒ !goog.iter.IteratorReturns an iterator that iterates over the ranges in the RangeSet. | |
add(?goog.math.Range a)Adds a range to the set. If the new range overlaps existing values, those ranges will be merged. | |
clear()Removes all values in the set. | |
clone() ⇒ !goog.math.RangeSet | |
contains(?goog.math.Range a) ⇒ booleanDetermines whether a given range is in the set. Only succeeds if the entire range is available. | |
containsValue(number value) ⇒ booleanDetermines whether a given value is set in the RangeSet. | |
coveredLength() ⇒ number | |
difference(!goog.math.RangeSet set) ⇒ !goog.math.RangeSetSubtracts the ranges of another set from this one, returning the result as a new RangeSet. | |
getBounds() ⇒ ?goog.math.Range | |
intersection(?goog.math.RangeSet set) ⇒ !goog.math.RangeSetIntersects this RangeSet with another. | |
inverse(?goog.math.Range range) ⇒ !goog.math.RangeSetCreates an inverted slice of this set over the input range. | |
isEmpty() ⇒ boolean | |
remove(?goog.math.Range a)Removes a range of values from the set. | |
slice(?goog.math.Range range) ⇒ !goog.math.RangeSetCreates a subset of this set over the input range. | |
toString() ⇒ string | |
union(?goog.math.RangeSet set) ⇒ !goog.math.RangeSetReturns the union of this RangeSet with another. | |
| Static Method Summary | |
equals(?goog.math.RangeSet a, ?goog.math.RangeSet b) ⇒ booleanCompares two sets for equality. | |