goog.math.RangeSet
Classgoog.math.RangeSet()
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.
.__iterator__(opt_keys)
Returns an iterator that iterates over the ranges in the RangeSet.
opt_keys
{boolean
=}
goog.iter.Iterator
}
.add(a)
Adds a range to the set. If the new range overlaps existing values, those ranges will be merged.
a
{goog.math.Range
}
.clear()
Removes all values in the set.
.clone()
goog.math.RangeSet
}
.contains(a)
Determines whether a given range is in the set. Only succeeds if the entire range is available.
a
{goog.math.Range
}
boolean
}
.containsValue(value)
Determines whether a given value is set in the RangeSet.
value
{number
}
boolean
}
.coveredLength()
number
}
.difference(set)
Subtracts the ranges of another set from this one, returning the result as a new RangeSet.
set
{!goog.math.RangeSet
}
goog.math.RangeSet
}
.equals(a, b)
Compares two sets for equality.
a
{goog.math.RangeSet
}
b
{goog.math.RangeSet
}
boolean
}
.getBounds()
goog.math.Range
}
.intersection(set)
Intersects this RangeSet with another.
set
{goog.math.RangeSet
}
goog.math.RangeSet
}
.inverse(range)
Creates an inverted slice of this set over the input range.
range
{goog.math.Range
}
goog.math.RangeSet
}
.isEmpty()
boolean
}
.remove(a)
Removes a range of values from the set.
a
{goog.math.Range
}
.slice(range)
Creates a subset of this set over the input range.
range
{goog.math.Range
}
goog.math.RangeSet
}
.toString()
string
}
.union(set)
Returns the union of this RangeSet with another.
set
{goog.math.RangeSet
}
goog.math.RangeSet
}