Skip to content

Conversation

@jacek-lewandowski
Copy link
Contributor

No description provided.


AbstractRanges(@Nonnull Range[] ranges)
{
if (ranges.length > 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't usually permit double nesting of no braces, the outer statement is usually braced (esp. when mixing if+for)

return this;
}

void checkRangeType(Range that)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final?

if (this.compareIntersecting(that) != 0)
return null;

if (this.contains(that))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably more efficient to check start == this.start && end == this.end below

if (this.contains(that))
return that;

if (that.contains(this))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably more efficient to check start == that.start && end == that.end below

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants