Skip to content

Navigation Menu

Sign in
Sign up

Add Range.overlaps(Range) to test for a nonempty intersection - #8649

Open
Gosling-dude wants to merge 1 commit into
google:master from
Gosling-dude:range-overlaps
Open

Add Range.overlaps(Range) to test for a nonempty intersection #8649
Gosling-dude wants to merge 1 commit into
google:master from
Gosling-dude:range-overlaps

Conversation

@Gosling-dude

@Gosling-dude Gosling-dude commented Aug 31, 2026

Copy link
Copy Markdown

Fixes #2094

google-cla Bot commented Aug 31, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Adds a boolean overlaps(Range<C> other) that returns true iff the two
ranges share at least one value, i.e. isConnected(other) && the
intersection is non-empty. Empty ranges overlap nothing, including
themselves.
Fixes google#2094 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cpovirk cpovirk Awaiting requested review from cpovirk

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

add Range.overlaps(Range) method

1 participant

AltStyle によって変換されたページ (->オリジナル) /