intersect

Computes the intersection of this range with other. Returns a pair representing the intersecting range, or null if the ranges don't overlap.

Return

A pair (start, end) representing the intersection, or null if no intersection exists

Parameters

other

The other range to intersect with

Type Parameters

T

The type of comparable values in the range


Computes the intersection of this IntRange with other. Returns the intersecting range, or null if the ranges don't overlap.

Return

An IntRange representing the intersection, or null if no intersection exists

Parameters

other

The other range to intersect with


Computes the intersection of this LongRange with other. Returns the intersecting range, or null if the ranges don't overlap.

Return

A LongRange representing the intersection, or null if no intersection exists

Parameters

other

The other range to intersect with