Skip to content

add Range.overlaps(Range) method #2094

Description

@bemace

Seems very strange that the Range class doesn't have an overlaps(Range) or intersects(Range) method.

I expect it would essentially be

public boolean overlaps(Range other) {
    return isConnected(other) && !intersection(other).isEmpty();
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions