Skip to content

Commit 61be35c

Browse files
klueverGoogle Java Core Libraries
authored and
Google Java Core Libraries
committedApr 10, 2023
Remove @Beta from ImmutableFoo.Builder.builderWithExpectedSize(...), orderEntriesByValue(...), and Entry-related APIs.
RELNOTES=Remove `@Beta` from `ImmutableFoo.Builder.builderWithExpectedSize(...)`, `orderEntriesByValue(...)`, and `Entry`-related APIs. PiperOrigin-RevId: 523143868
1 parent b3d4856 commit 61be35c

File tree

8 files changed

+0
-28
lines changed

8 files changed

+0
-28
lines changed
 

‎android/guava/src/com/google/common/collect/ImmutableBiMap.java

-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import static com.google.common.collect.CollectPreconditions.checkEntryNotNull;
2020
import static com.google.common.collect.CollectPreconditions.checkNonnegative;
2121

22-
import com.google.common.annotations.Beta;
2322
import com.google.common.annotations.GwtCompatible;
2423
import com.google.common.annotations.J2ktIncompatible;
2524
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -297,7 +296,6 @@ public static <K, V> Builder<K, V> builder() {
297296
*
298297
* @since 23.1
299298
*/
300-
@Beta
301299
public static <K, V> Builder<K, V> builderWithExpectedSize(int expectedSize) {
302300
checkNonnegative(expectedSize, "expectedSize");
303301
return new Builder<>(expectedSize);
@@ -389,7 +387,6 @@ public Builder<K, V> putAll(Map<? extends K, ? extends V> map) {
389387
* @since 19.0
390388
*/
391389
@CanIgnoreReturnValue
392-
@Beta
393390
@Override
394391
public Builder<K, V> putAll(Iterable<? extends Entry<? extends K, ? extends V>> entries) {
395392
super.putAll(entries);
@@ -407,7 +404,6 @@ public Builder<K, V> putAll(Iterable<? extends Entry<? extends K, ? extends V>>
407404
* @since 19.0
408405
*/
409406
@CanIgnoreReturnValue
410-
@Beta
411407
@Override
412408
public Builder<K, V> orderEntriesByValue(Comparator<? super V> valueComparator) {
413409
super.orderEntriesByValue(valueComparator);
@@ -515,7 +511,6 @@ public static <K, V> ImmutableBiMap<K, V> copyOf(Map<? extends K, ? extends V> m
515511
* @throws NullPointerException if any key, value, or entry is null
516512
* @since 19.0
517513
*/
518-
@Beta
519514
public static <K, V> ImmutableBiMap<K, V> copyOf(
520515
Iterable<? extends Entry<? extends K, ? extends V>> entries) {
521516
int estimatedSize =

‎android/guava/src/com/google/common/collect/ImmutableList.java

-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import static com.google.common.collect.ObjectArrays.checkElementsNotNull;
2626
import static com.google.common.collect.RegularImmutableList.EMPTY;
2727

28-
import com.google.common.annotations.Beta;
2928
import com.google.common.annotations.GwtCompatible;
3029
import com.google.common.annotations.J2ktIncompatible;
3130
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -702,7 +701,6 @@ public static <E> Builder<E> builder() {
702701
*
703702
* @since 23.1
704703
*/
705-
@Beta
706704
public static <E> Builder<E> builderWithExpectedSize(int expectedSize) {
707705
checkNonnegative(expectedSize, "expectedSize");
708706
return new ImmutableList.Builder<E>(expectedSize);

‎android/guava/src/com/google/common/collect/ImmutableMap.java

-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import static com.google.common.collect.CollectPreconditions.checkNonnegative;
2323
import static java.util.Objects.requireNonNull;
2424

25-
import com.google.common.annotations.Beta;
2625
import com.google.common.annotations.GwtCompatible;
2726
import com.google.common.annotations.J2ktIncompatible;
2827
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -336,7 +335,6 @@ public static <K, V> Builder<K, V> builder() {
336335
*
337336
* @since 23.1
338337
*/
339-
@Beta
340338
public static <K, V> Builder<K, V> builderWithExpectedSize(int expectedSize) {
341339
checkNonnegative(expectedSize, "expectedSize");
342340
return new Builder<>(expectedSize);
@@ -470,7 +468,6 @@ public Builder<K, V> putAll(Map<? extends K, ? extends V> map) {
470468
* @since 19.0
471469
*/
472470
@CanIgnoreReturnValue
473-
@Beta
474471
public Builder<K, V> putAll(Iterable<? extends Entry<? extends K, ? extends V>> entries) {
475472
if (entries instanceof Collection) {
476473
ensureCapacity(size + ((Collection<?>) entries).size());
@@ -492,7 +489,6 @@ public Builder<K, V> putAll(Iterable<? extends Entry<? extends K, ? extends V>>
492489
* @since 19.0
493490
*/
494491
@CanIgnoreReturnValue
495-
@Beta
496492
public Builder<K, V> orderEntriesByValue(Comparator<? super V> valueComparator) {
497493
checkState(this.valueComparator == null, "valueComparator was already set");
498494
this.valueComparator = checkNotNull(valueComparator, "valueComparator");
@@ -698,7 +694,6 @@ public static <K, V> ImmutableMap<K, V> copyOf(Map<? extends K, ? extends V> map
698694
* @throws IllegalArgumentException if two entries have the same key
699695
* @since 19.0
700696
*/
701-
@Beta
702697
public static <K, V> ImmutableMap<K, V> copyOf(
703698
Iterable<? extends Entry<? extends K, ? extends V>> entries) {
704699
int initialCapacity =

‎android/guava/src/com/google/common/collect/ImmutableSet.java

-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import static com.google.common.collect.ObjectArrays.checkElementNotNull;
2323
import static java.util.Objects.requireNonNull;
2424

25-
import com.google.common.annotations.Beta;
2625
import com.google.common.annotations.GwtCompatible;
2726
import com.google.common.annotations.J2ktIncompatible;
2827
import com.google.common.annotations.VisibleForTesting;
@@ -414,7 +413,6 @@ public static <E> Builder<E> builder() {
414413
*
415414
* @since 23.1
416415
*/
417-
@Beta
418416
public static <E> Builder<E> builderWithExpectedSize(int expectedSize) {
419417
checkNonnegative(expectedSize, "expectedSize");
420418
return new Builder<E>(expectedSize);

‎guava/src/com/google/common/collect/ImmutableBiMap.java

-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static com.google.common.collect.CollectPreconditions.checkNonnegative;
2121
import static java.util.Objects.requireNonNull;
2222

23-
import com.google.common.annotations.Beta;
2423
import com.google.common.annotations.GwtCompatible;
2524
import com.google.common.annotations.J2ktIncompatible;
2625
import com.google.common.annotations.VisibleForTesting;
@@ -303,7 +302,6 @@ public static <K, V> Builder<K, V> builder() {
303302
*
304303
* @since 23.1
305304
*/
306-
@Beta
307305
public static <K, V> Builder<K, V> builderWithExpectedSize(int expectedSize) {
308306
checkNonnegative(expectedSize, "expectedSize");
309307
return new Builder<>(expectedSize);
@@ -394,7 +392,6 @@ public Builder<K, V> putAll(Map<? extends K, ? extends V> map) {
394392
* @since 19.0
395393
*/
396394
@CanIgnoreReturnValue
397-
@Beta
398395
@Override
399396
public Builder<K, V> putAll(Iterable<? extends Entry<? extends K, ? extends V>> entries) {
400397
super.putAll(entries);
@@ -412,7 +409,6 @@ public Builder<K, V> putAll(Iterable<? extends Entry<? extends K, ? extends V>>
412409
* @since 19.0
413410
*/
414411
@CanIgnoreReturnValue
415-
@Beta
416412
@Override
417413
public Builder<K, V> orderEntriesByValue(Comparator<? super V> valueComparator) {
418414
super.orderEntriesByValue(valueComparator);
@@ -556,7 +552,6 @@ public static <K, V> ImmutableBiMap<K, V> copyOf(Map<? extends K, ? extends V> m
556552
* @throws NullPointerException if any key, value, or entry is null
557553
* @since 19.0
558554
*/
559-
@Beta
560555
public static <K, V> ImmutableBiMap<K, V> copyOf(
561556
Iterable<? extends Entry<? extends K, ? extends V>> entries) {
562557
@SuppressWarnings("unchecked") // we'll only be using getKey and getValue, which are covariant

‎guava/src/com/google/common/collect/ImmutableList.java

-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import static com.google.common.collect.RegularImmutableList.EMPTY;
2626
import static java.util.Objects.requireNonNull;
2727

28-
import com.google.common.annotations.Beta;
2928
import com.google.common.annotations.GwtCompatible;
3029
import com.google.common.annotations.J2ktIncompatible;
3130
import com.google.common.annotations.VisibleForTesting;
@@ -749,7 +748,6 @@ public static <E> Builder<E> builder() {
749748
*
750749
* @since 23.1
751750
*/
752-
@Beta
753751
public static <E> Builder<E> builderWithExpectedSize(int expectedSize) {
754752
checkNonnegative(expectedSize, "expectedSize");
755753
return new ImmutableList.Builder<E>(expectedSize);

‎guava/src/com/google/common/collect/ImmutableMap.java

-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import static com.google.common.collect.CollectPreconditions.checkNonnegative;
2323
import static java.util.Objects.requireNonNull;
2424

25-
import com.google.common.annotations.Beta;
2625
import com.google.common.annotations.GwtCompatible;
2726
import com.google.common.annotations.J2ktIncompatible;
2827
import com.google.common.annotations.VisibleForTesting;
@@ -362,7 +361,6 @@ public static <K, V> Builder<K, V> builder() {
362361
*
363362
* @since 23.1
364363
*/
365-
@Beta
366364
public static <K, V> Builder<K, V> builderWithExpectedSize(int expectedSize) {
367365
checkNonnegative(expectedSize, "expectedSize");
368366
return new Builder<>(expectedSize);
@@ -488,7 +486,6 @@ public Builder<K, V> putAll(Map<? extends K, ? extends V> map) {
488486
* @since 19.0
489487
*/
490488
@CanIgnoreReturnValue
491-
@Beta
492489
public Builder<K, V> putAll(Iterable<? extends Entry<? extends K, ? extends V>> entries) {
493490
if (entries instanceof Collection) {
494491
ensureCapacity(size + ((Collection<?>) entries).size());
@@ -510,7 +507,6 @@ public Builder<K, V> putAll(Iterable<? extends Entry<? extends K, ? extends V>>
510507
* @since 19.0
511508
*/
512509
@CanIgnoreReturnValue
513-
@Beta
514510
public Builder<K, V> orderEntriesByValue(Comparator<? super V> valueComparator) {
515511
checkState(this.valueComparator == null, "valueComparator was already set");
516512
this.valueComparator = checkNotNull(valueComparator, "valueComparator");
@@ -700,7 +696,6 @@ public static <K, V> ImmutableMap<K, V> copyOf(Map<? extends K, ? extends V> map
700696
* @throws IllegalArgumentException if two entries have the same key
701697
* @since 19.0
702698
*/
703-
@Beta
704699
public static <K, V> ImmutableMap<K, V> copyOf(
705700
Iterable<? extends Entry<? extends K, ? extends V>> entries) {
706701
@SuppressWarnings("unchecked") // we'll only be using getKey and getValue, which are covariant

‎guava/src/com/google/common/collect/ImmutableSet.java

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import static com.google.common.collect.CollectPreconditions.checkNonnegative;
2222
import static java.util.Objects.requireNonNull;
2323

24-
import com.google.common.annotations.Beta;
2524
import com.google.common.annotations.GwtCompatible;
2625
import com.google.common.annotations.J2ktIncompatible;
2726
import com.google.common.annotations.VisibleForTesting;
@@ -453,7 +452,6 @@ public static <E> Builder<E> builder() {
453452
*
454453
* @since 23.1
455454
*/
456-
@Beta
457455
public static <E> Builder<E> builderWithExpectedSize(int expectedSize) {
458456
checkNonnegative(expectedSize, "expectedSize");
459457
return new Builder<E>(expectedSize);

0 commit comments

Comments
 (0)
Please sign in to comment.