Skip to content

Commit

Permalink
Group overloads.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 662120655
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Aug 12, 2024
1 parent 36dfb16 commit 0cb9cc6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions android/guava/src/com/google/common/collect/Range.java
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,14 @@ public String toString() {
return toString(lowerBound, upperBound);
}

private static String toString(Cut<?> lowerBound, Cut<?> upperBound) {
StringBuilder sb = new StringBuilder(16);
lowerBound.describeAsLowerBound(sb);
sb.append("..");
upperBound.describeAsUpperBound(sb);
return sb.toString();
}

// We declare accessors so that we can use method references like `Range::lowerBound`.

Cut<C> lowerBound() {
Expand All @@ -681,14 +689,6 @@ Cut<C> upperBound() {
return upperBound;
}

private static String toString(Cut<?> lowerBound, Cut<?> upperBound) {
StringBuilder sb = new StringBuilder(16);
lowerBound.describeAsLowerBound(sb);
sb.append("..");
upperBound.describeAsUpperBound(sb);
return sb.toString();
}

Object readResolve() {
if (this.equals(ALL)) {
return all();
Expand Down
16 changes: 8 additions & 8 deletions guava/src/com/google/common/collect/Range.java
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,14 @@ public String toString() {
return toString(lowerBound, upperBound);
}

private static String toString(Cut<?> lowerBound, Cut<?> upperBound) {
StringBuilder sb = new StringBuilder(16);
lowerBound.describeAsLowerBound(sb);
sb.append("..");
upperBound.describeAsUpperBound(sb);
return sb.toString();
}

// We declare accessors so that we can use method references like `Range::lowerBound`.

Cut<C> lowerBound() {
Expand All @@ -681,14 +689,6 @@ Cut<C> upperBound() {
return upperBound;
}

private static String toString(Cut<?> lowerBound, Cut<?> upperBound) {
StringBuilder sb = new StringBuilder(16);
lowerBound.describeAsLowerBound(sb);
sb.append("..");
upperBound.describeAsUpperBound(sb);
return sb.toString();
}

Object readResolve() {
if (this.equals(ALL)) {
return all();
Expand Down

0 comments on commit 0cb9cc6

Please sign in to comment.