Gets the overlap details between two lists of UintRanges. Returns a tuple of [remainingInThis, overlaps, remainingInOther].
Gets the overlap between the current range and another
Private
getInvert a list of UintRanges (i.e. get all values in some bounds not in current list) in-place.
Remove a range from the current range in-place
Search ID ranges for a specific ID. Return [idx, found], where idx is the index of the range that contains the ID, and found is true if the ID was found.
If you just want one or the other, use searchIndex() or searchIfExists().
Search ID ranges for a specific ID. Return true, if found.
Search for the first index of an element that includes the provided value.
Sorts and merges a list of UintRanges. If ranges overlap, they are merged.
[{start: 1, end: 3}, {start: 2, end: 4}] => [{start: 1, end: 4}]
Does not return a new list. Modifies the list in place. To get a new list, use clone().sortAndMerge()
.
Wrapper for invert that returns a new list instead of modifying the current list.
Static
FromStatic
FullReturns a new UintRangeArray from 1 to 18446744073709551615 (max uint64).
Asserts two UintRanges[] do not overlap at all with each other. For example, if we have a list of permitted and forbidden times, we want to make sure that the forbidden times do not overlap with the permitted times.