Create a new range from 2 values.
Time complexity: O(1)
Space complexity: O(1)
The lower bound of this range
The upper bound of this range
An iterable that contains this.lower
and this.upper
.
Time complexity: O(1)
Space complexity: O(1)
Check whether a given range has the same lower and upper bounds as this one.
Time complexity: O(1)
Space complexity: O(1)
Range to compare
Whether the other range has the same lower and upper bounds as this one
Returns true
if value
is within this.lower
and this.upper
, false otherwise.
The >=
and <=
operators are used to compare value
.
Time complexity: O(1)
Space complexity: O(1)
Check if this range and a given range have any intersection.
Time complexity: O(1)
Space complexity: O(1)
Range to compare
Whether the ranges intersect
Check whether this range contains the given range
Time complexity: O(1)
Space complexity: O(1)
Range to compare
Whether this range contains the given range
Check whether a given range contains this range.
Time complexity: O(1)
Space complexity: O(1)
Range to compare
Whether this range is contained within the other one
Static
fromCreate a new range from the first 2 values of an iterable.
Time complexity: O(1)
Space complexity: O(1)
The iterable to create a range from
A new range
A range between 2 values.