Skip to content

Commit 98820c7

Browse files
klueverGoogle Java Core Libraries
authored and
Google Java Core Libraries
committedMay 12, 2023
Remove @Beta from various collect APIs.
RELNOTES=`collect`: Remove `@Beta` from various `collect` APIs. PiperOrigin-RevId: 531549473
1 parent 912815e commit 98820c7

34 files changed

+0
-108
lines changed
 

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

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import static com.google.common.base.Preconditions.checkNotNull;
2222
import static java.util.Collections.emptyMap;
2323

24-
import com.google.common.annotations.Beta;
2524
import com.google.common.annotations.GwtCompatible;
2625
import com.google.common.annotations.GwtIncompatible;
2726
import com.google.common.base.Objects;
@@ -88,7 +87,6 @@
8887
* @author Jared Levy
8988
* @since 10.0
9089
*/
91-
@Beta
9290
@GwtCompatible(emulated = true)
9391
@ElementTypesAreNonnullByDefault
9492
public final class ArrayTable<R, C, V> extends AbstractTable<R, C, @Nullable V>

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

-4
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.base.Function;
2726
import com.google.common.base.Predicate;
@@ -357,7 +356,6 @@ static StringBuilder newStringBuilderForCollection(int size) {
357356
* @throws NullPointerException if the specified iterable is null or has any null elements.
358357
* @since 12.0
359358
*/
360-
@Beta
361359
public static <E extends Comparable<? super E>> Collection<List<E>> orderedPermutations(
362360
Iterable<E> elements) {
363361
return orderedPermutations(elements, Ordering.natural());
@@ -409,7 +407,6 @@ public static <E extends Comparable<? super E>> Collection<List<E>> orderedPermu
409407
* the specified comparator is null.
410408
* @since 12.0
411409
*/
412-
@Beta
413410
public static <E> Collection<List<E>> orderedPermutations(
414411
Iterable<E> elements, Comparator<? super E> comparator) {
415412
return new OrderedPermutationCollection<E>(elements, comparator);
@@ -571,7 +568,6 @@ int findNextL(int j) {
571568
* @throws NullPointerException if the specified collection is null or has any null elements.
572569
* @since 12.0
573570
*/
574-
@Beta
575571
public static <E> Collection<List<E>> permutations(Collection<E> elements) {
576572
return new PermutationCollection<E>(ImmutableList.copyOf(elements));
577573
}

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

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import static com.google.common.base.Preconditions.checkState;
2222
import static com.google.common.collect.CollectPreconditions.checkNonnegative;
2323

24-
import com.google.common.annotations.Beta;
2524
import com.google.common.annotations.GwtIncompatible;
2625
import com.google.common.annotations.J2ktIncompatible;
2726
import com.google.common.annotations.VisibleForTesting;
@@ -120,7 +119,6 @@ public static <E> ConcurrentHashMultiset<E> create(Iterable<? extends E> element
120119
* @throws IllegalArgumentException if {@code countMap} is not empty
121120
* @since 20.0
122121
*/
123-
@Beta
124122
public static <E> ConcurrentHashMultiset<E> create(ConcurrentMap<E, AtomicInteger> countMap) {
125123
return new ConcurrentHashMultiset<>(countMap);
126124
}

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

-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import static com.google.common.base.Preconditions.checkNotNull;
1919
import static java.util.Objects.requireNonNull;
2020

21-
import com.google.common.annotations.Beta;
2221
import com.google.common.annotations.GwtCompatible;
2322
import com.google.common.annotations.GwtIncompatible;
2423
import com.google.errorprone.annotations.DoNotCall;
@@ -103,7 +102,6 @@ public static <C extends Comparable> ContiguousSet<C> create(
103102
* @throws IllegalArgumentException if {@code lower} is greater than {@code upper}
104103
* @since 23.0
105104
*/
106-
@Beta
107105
public static ContiguousSet<Integer> closed(int lower, int upper) {
108106
return create(Range.closed(lower, upper), DiscreteDomain.integers());
109107
}
@@ -116,7 +114,6 @@ public static ContiguousSet<Integer> closed(int lower, int upper) {
116114
* @throws IllegalArgumentException if {@code lower} is greater than {@code upper}
117115
* @since 23.0
118116
*/
119-
@Beta
120117
public static ContiguousSet<Long> closed(long lower, long upper) {
121118
return create(Range.closed(lower, upper), DiscreteDomain.longs());
122119
}
@@ -129,7 +126,6 @@ public static ContiguousSet<Long> closed(long lower, long upper) {
129126
* @throws IllegalArgumentException if {@code lower} is greater than {@code upper}
130127
* @since 23.0
131128
*/
132-
@Beta
133129
public static ContiguousSet<Integer> closedOpen(int lower, int upper) {
134130
return create(Range.closedOpen(lower, upper), DiscreteDomain.integers());
135131
}
@@ -142,7 +138,6 @@ public static ContiguousSet<Integer> closedOpen(int lower, int upper) {
142138
* @throws IllegalArgumentException if {@code lower} is greater than {@code upper}
143139
* @since 23.0
144140
*/
145-
@Beta
146141
public static ContiguousSet<Long> closedOpen(long lower, long upper) {
147142
return create(Range.closedOpen(lower, upper), DiscreteDomain.longs());
148143
}

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

-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import static com.google.common.base.Preconditions.checkArgument;
2020
import static com.google.common.base.Preconditions.checkNotNull;
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.common.annotations.VisibleForTesting;
@@ -44,7 +43,6 @@
4443
* @author Kurt Alfred Kluever
4544
* @since 15.0
4645
*/
47-
@Beta
4846
@GwtCompatible
4947
@ElementTypesAreNonnullByDefault
5048
public final class EvictingQueue<E> extends ForwardingQueue<E> implements Serializable {

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

-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import static com.google.common.collect.Maps.keyOrNull;
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;
@@ -359,7 +358,6 @@ public static <K, V> ImmutableSortedMap<K, V> copyOf(
359358
* @throws IllegalArgumentException if any two keys are equal according to the comparator
360359
* @since 19.0
361360
*/
362-
@Beta
363361
public static <K, V> ImmutableSortedMap<K, V> copyOf(
364362
Iterable<? extends Entry<? extends K, ? extends V>> entries) {
365363
// Hack around K not being a subtype of Comparable.
@@ -377,7 +375,6 @@ public static <K, V> ImmutableSortedMap<K, V> copyOf(
377375
* @throws IllegalArgumentException if any two keys are equal according to the comparator
378376
* @since 19.0
379377
*/
380-
@Beta
381378
public static <K, V> ImmutableSortedMap<K, V> copyOf(
382379
Iterable<? extends Entry<? extends K, ? extends V>> entries,
383380
Comparator<? super K> comparator) {
@@ -652,7 +649,6 @@ public Builder<K, V> putAll(Map<? extends K, ? extends V> map) {
652649
* @since 19.0
653650
*/
654651
@CanIgnoreReturnValue
655-
@Beta
656652
@Override
657653
public Builder<K, V> putAll(Iterable<? extends Entry<? extends K, ? extends V>> entries) {
658654
super.putAll(entries);
@@ -666,7 +662,6 @@ public Builder<K, V> putAll(Iterable<? extends Entry<? extends K, ? extends V>>
666662
* @deprecated Unsupported by ImmutableSortedMap.Builder.
667663
*/
668664
@CanIgnoreReturnValue
669-
@Beta
670665
@Override
671666
@Deprecated
672667
@DoNotCall("Always throws UnsupportedOperationException")

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

-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static com.google.common.base.Preconditions.checkNotNull;
2121
import static com.google.common.collect.CollectPreconditions.checkRemove;
2222

23-
import com.google.common.annotations.Beta;
2423
import com.google.common.annotations.GwtCompatible;
2524
import com.google.common.annotations.GwtIncompatible;
2625
import com.google.common.base.Function;
@@ -1053,7 +1052,6 @@ public static boolean isEmpty(Iterable<?> iterable) {
10531052
*
10541053
* @since 11.0
10551054
*/
1056-
@Beta
10571055
public static <T extends @Nullable Object> Iterable<T> mergeSorted(
10581056
final Iterable<? extends Iterable<? extends T>> iterables,
10591057
final Comparator<? super T> comparator) {

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

-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import static com.google.common.collect.NullnessCasts.uncheckedCastNullableTToT;
2525
import static java.util.Objects.requireNonNull;
2626

27-
import com.google.common.annotations.Beta;
2827
import com.google.common.annotations.GwtCompatible;
2928
import com.google.common.annotations.GwtIncompatible;
3029
import com.google.common.base.Function;
@@ -1295,7 +1294,6 @@ public E peek() {
12951294
*
12961295
* @since 11.0
12971296
*/
1298-
@Beta
12991297
public static <T extends @Nullable Object> UnmodifiableIterator<T> mergeSorted(
13001298
Iterable<? extends Iterator<? extends T>> iterators, Comparator<? super T> comparator) {
13011299
checkNotNull(iterators, "iterators");

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

-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import static com.google.common.collect.CollectPreconditions.checkNonnegative;
2626
import static com.google.common.collect.CollectPreconditions.checkRemove;
2727

28-
import com.google.common.annotations.Beta;
2928
import com.google.common.annotations.GwtCompatible;
3029
import com.google.common.annotations.GwtIncompatible;
3130
import com.google.common.annotations.J2ktIncompatible;
@@ -717,7 +716,6 @@ public static ImmutableList<Character> charactersOf(String string) {
717716
* @return an {@code List<Character>} view of the character sequence
718717
* @since 7.0
719718
*/
720-
@Beta
721719
public static List<Character> charactersOf(CharSequence sequence) {
722720
return new CharSequenceAsList(checkNotNull(sequence));
723721
}

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

-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import static com.google.common.collect.NullnessCasts.uncheckedCastNullableTToT;
2525
import static java.util.Objects.requireNonNull;
2626

27-
import com.google.common.annotations.Beta;
2827
import com.google.common.annotations.GwtCompatible;
2928
import com.google.common.annotations.GwtIncompatible;
3029
import com.google.common.annotations.J2ktIncompatible;
@@ -4355,7 +4354,6 @@ static <E> ImmutableMap<E, Integer> indexMap(Collection<E> list) {
43554354
*
43564355
* @since 20.0
43574356
*/
4358-
@Beta
43594357
@GwtIncompatible // NavigableMap
43604358
public static <K extends Comparable<? super K>, V extends @Nullable Object>
43614359
NavigableMap<K, V> subMap(NavigableMap<K, V> map, Range<K> range) {

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

-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import static com.google.common.collect.CollectPreconditions.checkRemove;
2424
import static java.util.Objects.requireNonNull;
2525

26-
import com.google.common.annotations.Beta;
2726
import com.google.common.annotations.GwtCompatible;
2827
import com.google.common.annotations.J2ktIncompatible;
2928
import com.google.common.annotations.VisibleForTesting;
@@ -99,7 +98,6 @@
9998
* @author Torbjorn Gannholm
10099
* @since 8.0
101100
*/
102-
@Beta
103101
@GwtCompatible
104102
@ElementTypesAreNonnullByDefault
105103
public final class MinMaxPriorityQueue<E> extends AbstractQueue<E> {
@@ -163,7 +161,6 @@ public static Builder<Comparable> maximumSize(int maximumSize) {
163161
* Queue<Integer>} but not a {@code Queue<Object>}).
164162
* @since 8.0
165163
*/
166-
@Beta
167164
public static final class Builder<B> {
168165
/*
169166
* TODO(kevinb): when the dust settles, see if we still need this or can

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

-7
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import static com.google.common.collect.CollectPreconditions.checkRemove;
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.base.Objects;
2827
import com.google.common.base.Predicate;
@@ -199,7 +198,6 @@ public boolean setCount(@ParametricNullness E element, int oldCount, int newCoun
199198
* @return an unmodifiable view of the multiset
200199
* @since 11.0
201200
*/
202-
@Beta
203201
public static <E extends @Nullable Object> SortedMultiset<E> unmodifiableSortedMultiset(
204202
SortedMultiset<E> sortedMultiset) {
205203
// it's in its own file so it can be emulated for GWT
@@ -274,7 +272,6 @@ public ImmutableEntry<E> nextInBucket() {
274272
*
275273
* @since 14.0
276274
*/
277-
@Beta
278275
public static <E extends @Nullable Object> Multiset<E> filter(
279276
Multiset<E> unfiltered, Predicate<? super E> predicate) {
280277
if (unfiltered instanceof FilteredMultiset) {
@@ -381,7 +378,6 @@ static int inferDistinctElements(Iterable<?> elements) {
381378
*
382379
* @since 14.0
383380
*/
384-
@Beta
385381
public static <E extends @Nullable Object> Multiset<E> union(
386382
final Multiset<? extends E> multiset1, final Multiset<? extends E> multiset2) {
387383
checkNotNull(multiset1);
@@ -511,7 +507,6 @@ protected Entry<E> computeNext() {
511507
*
512508
* @since 14.0
513509
*/
514-
@Beta
515510
public static <E extends @Nullable Object> Multiset<E> sum(
516511
final Multiset<? extends E> multiset1, final Multiset<? extends E> multiset2) {
517512
checkNotNull(multiset1);
@@ -589,7 +584,6 @@ protected Entry<E> computeNext() {
589584
*
590585
* @since 14.0
591586
*/
592-
@Beta
593587
public static <E extends @Nullable Object> Multiset<E> difference(
594588
final Multiset<E> multiset1, final Multiset<?> multiset2) {
595589
checkNotNull(multiset1);
@@ -1143,7 +1137,6 @@ static int linearTimeSizeImpl(Multiset<?> multiset) {
11431137
*
11441138
* @since 11.0
11451139
*/
1146-
@Beta
11471140
public static <E> ImmutableMultiset<E> copyHighestCountFirst(Multiset<E> multiset) {
11481141
Entry<E>[] entries = (Entry<E>[]) multiset.entrySet().toArray(new Entry[0]);
11491142
Arrays.sort(entries, DecreasingCount.INSTANCE);

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

-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
package com.google.common.collect;
1616

17-
import com.google.common.annotations.Beta;
1817
import com.google.common.annotations.GwtCompatible;
1918
import com.google.common.annotations.GwtIncompatible;
2019
import com.google.common.annotations.J2ktIncompatible;
@@ -283,7 +282,6 @@ public static <E> SynchronousQueue<E> newSynchronousQueue() {
283282
* @return the number of elements transferred
284283
* @throws InterruptedException if interrupted while waiting
285284
*/
286-
@Beta
287285
@CanIgnoreReturnValue
288286
@J2ktIncompatible
289287
@GwtIncompatible // BlockingQueue
@@ -332,7 +330,6 @@ public static <E> int drain(
332330
* @param unit a {@code TimeUnit} determining how to interpret the timeout parameter
333331
* @return the number of elements transferred
334332
*/
335-
@Beta
336333
@CanIgnoreReturnValue
337334
@J2ktIncompatible
338335
@GwtIncompatible // BlockingQueue

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

-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static com.google.common.base.Preconditions.checkNotNull;
2121
import static com.google.common.collect.CollectPreconditions.checkNonnegative;
2222

23-
import com.google.common.annotations.Beta;
2423
import com.google.common.annotations.GwtCompatible;
2524
import com.google.common.annotations.GwtIncompatible;
2625
import com.google.common.annotations.J2ktIncompatible;
@@ -1598,7 +1597,6 @@ public String toString() {
15981597
* @throws NullPointerException if {@code set} is or contains {@code null}
15991598
* @since 23.0
16001599
*/
1601-
@Beta
16021600
public static <E> Set<Set<E>> combinations(Set<E> set, final int size) {
16031601
final ImmutableMap<E, Integer> index = Maps.indexMap(set);
16041602
checkNonnegative(size, "size");
@@ -2077,7 +2075,6 @@ public String toString() {
20772075
*
20782076
* @since 20.0
20792077
*/
2080-
@Beta
20812078
@GwtIncompatible // NavigableSet
20822079
public static <K extends Comparable<? super K>> NavigableSet<K> subSet(
20832080
NavigableSet<K> set, Range<K> range) {

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

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static com.google.common.base.Preconditions.checkNotNull;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.common.base.Function;
2221
import java.util.Collections;
@@ -35,7 +34,6 @@
3534
* @author Louis Wasserman
3635
*/
3736
@GwtCompatible
38-
@Beta
3937
@ElementTypesAreNonnullByDefault
4038
final class SortedLists {
4139
private SortedLists() {}

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

-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static com.google.common.base.Preconditions.checkNotNull;
2121
import static com.google.common.collect.NullnessCasts.uncheckedCastNullableTToT;
2222

23-
import com.google.common.annotations.Beta;
2423
import com.google.common.annotations.GwtCompatible;
2524
import com.google.common.base.Function;
2625
import com.google.common.base.Objects;
@@ -311,7 +310,6 @@ Iterator<Cell<C, R, V>> cellIterator() {
311310
* @throws IllegalArgumentException if {@code backingMap} is not empty
312311
* @since 10.0
313312
*/
314-
@Beta
315313
public static <R, C, V> Table<R, C, V> newCustomTable(
316314
Map<R, Map<C, V>> backingMap, Supplier<? extends Map<C, V>> factory) {
317315
checkArgument(backingMap.isEmpty());
@@ -341,7 +339,6 @@ public static <R, C, V> Table<R, C, V> newCustomTable(
341339
*
342340
* @since 10.0
343341
*/
344-
@Beta
345342
public static <
346343
R extends @Nullable Object,
347344
C extends @Nullable Object,
@@ -594,7 +591,6 @@ public Collection<V> values() {
594591
* @return an unmodifiable view of the specified table
595592
* @since 11.0
596593
*/
597-
@Beta
598594
public static <R extends @Nullable Object, C extends @Nullable Object, V extends @Nullable Object>
599595
RowSortedTable<R, C, V> unmodifiableRowSortedTable(
600596
RowSortedTable<R, ? extends C, ? extends V> table) {

0 commit comments

Comments
 (0)
Please sign in to comment.