Returns a view of the disconnected ranges that make up this range set.
Returns a view of the disconnected ranges that make up this
range set. The returned set may be empty. The iterators returned by its
Iterable#iterator
method return the ranges in increasing order of lower bound
(equivalently, of upper bound).
Returns a view of the complement of this RangeSet
.
Returns a Some
with the minimal range which encloses all ranges in this range set
or None
if this range set is empty
Returns a view of the intersection of this RangeSet
with the specified range.
Determines whether any of this range set's member ranges contains value
.
Returns true
if there exists a member range in this range set which
encloses the specified range.
Returns true
if for each member range in other
there exists a member range in
this range set which encloses it.
Returns true
if for each member range in other
there exists a member range in
this range set which encloses it. It follows that this.contains(value)
whenever other.contains(value)
.
Returns true
if other
is empty.
This is equivalent to checking if this range set #encloses
each of the ranges in
other
.
Returns true
if obj
is another RangeSet
that contains the same ranges
according to Range#equals(Any)
.
Returns true
if obj
is another RangeSet
that contains the same ranges
according to Range#equals(Any)
.
Returns asRanges().hashCode()
.
Returns asRanges().hashCode()
.
Returns true
if this range set contains no ranges.
Returns the unique range from this range set that contains
value
as Some(value)
, or None
if this range set does not contain value
.
Returns a readable string representation of this range set.
Returns a readable string representation of this range set. For example, if this
RangeSet
consisted of Ranges.closed(1, 3)
and Ranges.greaterThan(4)
,
this might return "{[1‥3](4‥+∞)}"
.
Implementation trait for RangeSet
A range set is a set comprising zero or more nonempty, disconnected ranges of type
C
for which anOrdering[C]
is defined.Note that the behavior of
Range#isEmpty()
andRange#isConnected(Range)
may not be as expected on discrete ranges. See the Scaladoc of those methods for details.For a
Set
whose contents are specified by a Range, see ContiguousSet.Usage example:
0.8