-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add range assertions and docs #35
base: trunk
Are you sure you want to change the base?
Conversation
@@ -41,6 +41,11 @@ | |||
|
|||
AbstractRanges(@Nonnull Range[] ranges) | |||
{ | |||
if (ranges.length > 0) |
There was a problem hiding this comment.
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)
@@ -366,4 +371,10 @@ public Range toUnseekable() | |||
{ | |||
return this; | |||
} | |||
|
|||
void checkRangeType(Range that) |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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
4a7bd95
to
d6bf06f
Compare
6a9482b
to
4a8566a
Compare
c3a1d8f
to
efc6a38
Compare
289d5ea
to
064735b
Compare
2edc7fb
to
a271897
Compare
183d5d0
to
cd7f495
Compare
No description provided.