Skip to content

Commit 9760dbc

Browse files
klueverGoogle Java Core Libraries
authored and
Google Java Core Libraries
committedMay 12, 2023
Remove @Beta from Forwarding[Foo] APIs.
RELNOTES=`collect`: Remove `@Beta` from `Forwarding[Foo]` APIs. PiperOrigin-RevId: 531512286
1 parent cba0b0a commit 9760dbc

18 files changed

+0
-68
lines changed
 

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

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

1717
package com.google.common.collect;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.errorprone.annotations.CanIgnoreReturnValue;
2221
import java.util.Collection;
@@ -204,7 +203,6 @@ protected ListIterator<E> standardListIterator() {
204203
*
205204
* @since 7.0
206205
*/
207-
@Beta
208206
protected ListIterator<E> standardListIterator(int start) {
209207
return Lists.listIteratorImpl(this, start);
210208
}
@@ -215,7 +213,6 @@ protected ListIterator<E> standardListIterator(int start) {
215213
*
216214
* @since 7.0
217215
*/
218-
@Beta
219216
protected List<E> standardSubList(int fromIndex, int toIndex) {
220217
return Lists.subListImpl(this, fromIndex, toIndex);
221218
}
@@ -227,7 +224,6 @@ protected List<E> standardSubList(int fromIndex, int toIndex) {
227224
*
228225
* @since 7.0
229226
*/
230-
@Beta
231227
protected boolean standardEquals(@CheckForNull Object object) {
232228
return Lists.equalsImpl(this, object);
233229
}
@@ -239,7 +235,6 @@ protected boolean standardEquals(@CheckForNull Object object) {
239235
*
240236
* @since 7.0
241237
*/
242-
@Beta
243238
protected int standardHashCode() {
244239
return Lists.hashCodeImpl(this);
245240
}

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

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

1717
package com.google.common.collect;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.common.base.Objects;
2221
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -163,7 +162,6 @@ protected void standardPutAll(Map<? extends K, ? extends V> map) {
163162
*
164163
* @since 7.0
165164
*/
166-
@Beta
167165
@CheckForNull
168166
protected V standardRemove(@CheckForNull Object key) {
169167
Iterator<Entry<K, V>> entryIterator = entrySet().iterator();
@@ -198,7 +196,6 @@ protected void standardClear() {
198196
*
199197
* @since 10.0
200198
*/
201-
@Beta
202199
protected class StandardKeySet extends Maps.KeySet<K, V> {
203200
/** Constructor for use by subclasses. */
204201
public StandardKeySet() {
@@ -213,7 +210,6 @@ public StandardKeySet() {
213210
*
214211
* @since 7.0
215212
*/
216-
@Beta
217213
protected boolean standardContainsKey(@CheckForNull Object key) {
218214
return Maps.containsKeyImpl(this, key);
219215
}
@@ -227,7 +223,6 @@ protected boolean standardContainsKey(@CheckForNull Object key) {
227223
*
228224
* @since 10.0
229225
*/
230-
@Beta
231226
protected class StandardValues extends Maps.Values<K, V> {
232227
/** Constructor for use by subclasses. */
233228
public StandardValues() {
@@ -255,7 +250,6 @@ protected boolean standardContainsValue(@CheckForNull Object value) {
255250
*
256251
* @since 10.0
257252
*/
258-
@Beta
259253
protected abstract class StandardEntrySet extends Maps.EntrySet<K, V> {
260254
/** Constructor for use by subclasses. */
261255
protected StandardEntrySet() {}

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

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

1717
package com.google.common.collect;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.common.base.Objects;
2221
import java.util.Map;
@@ -123,7 +122,6 @@ protected int standardHashCode() {
123122
*
124123
* @since 7.0
125124
*/
126-
@Beta
127125
protected String standardToString() {
128126
return getKey() + "=" + getValue();
129127
}

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

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

1717
package com.google.common.collect;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.common.base.Objects;
2221
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -138,7 +137,6 @@ protected void standardClear() {
138137
*
139138
* @since 7.0
140139
*/
141-
@Beta
142140
protected int standardCount(@CheckForNull Object object) {
143141
for (Entry<?> entry : this.entrySet()) {
144142
if (Objects.equal(entry.getElement(), object)) {
@@ -167,7 +165,6 @@ protected boolean standardAdd(@ParametricNullness E element) {
167165
*
168166
* @since 7.0
169167
*/
170-
@Beta
171168
@Override
172169
protected boolean standardAddAll(Collection<? extends E> elementsToAdd) {
173170
return Multisets.addAllImpl(this, elementsToAdd);
@@ -243,7 +240,6 @@ protected boolean standardSetCount(@ParametricNullness E element, int oldCount,
243240
*
244241
* @since 10.0
245242
*/
246-
@Beta
247243
protected class StandardElementSet extends Multisets.ElementSet<E> {
248244
/** Constructor for use by subclasses. */
249245
public StandardElementSet() {}

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

-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import static com.google.common.collect.Maps.keyOrNull;
2020

21-
import com.google.common.annotations.Beta;
2221
import com.google.common.annotations.GwtIncompatible;
2322
import java.util.Iterator;
2423
import java.util.NavigableMap;
@@ -300,7 +299,6 @@ public NavigableMap<K, V> descendingMap() {
300299
*
301300
* @since 12.0
302301
*/
303-
@Beta
304302
protected class StandardDescendingMap extends Maps.DescendingMap<K, V> {
305303
/** Constructor for use by subclasses. */
306304
public StandardDescendingMap() {}
@@ -359,7 +357,6 @@ public NavigableSet<K> navigableKeySet() {
359357
*
360358
* @since 12.0
361359
*/
362-
@Beta
363360
protected class StandardNavigableKeySet extends Maps.NavigableKeySet<K, V> {
364361
/** Constructor for use by subclasses. */
365362
public StandardNavigableKeySet() {
@@ -379,7 +376,6 @@ public NavigableSet<K> descendingKeySet() {
379376
* descendingMap}, you may wish to override {@code descendingKeySet} to forward to this
380377
* implementation.
381378
*/
382-
@Beta
383379
protected NavigableSet<K> standardDescendingKeySet() {
384380
return descendingMap().navigableKeySet();
385381
}

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

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

1717
package com.google.common.collect;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtIncompatible;
2120
import java.util.Iterator;
2221
import java.util.NavigableSet;
@@ -181,7 +180,6 @@ public NavigableSet<E> descendingSet() {
181180
*
182181
* @since 12.0
183182
*/
184-
@Beta
185183
protected class StandardDescendingSet extends Sets.DescendingSet<E> {
186184
/** Constructor for use by subclasses. */
187185
public StandardDescendingSet() {
@@ -208,7 +206,6 @@ public NavigableSet<E> subSet(
208206
* {@code headSet} and {@code tailSet} methods. In many cases, you may wish to override {@link
209207
* #subSet(Object, boolean, Object, boolean)} to forward to this implementation.
210208
*/
211-
@Beta
212209
protected NavigableSet<E> standardSubSet(
213210
@ParametricNullness E fromElement,
214211
boolean fromInclusive,

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

-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import static com.google.common.base.Preconditions.checkArgument;
2020

21-
import com.google.common.annotations.Beta;
2221
import com.google.common.annotations.GwtCompatible;
2322
import java.util.Comparator;
2423
import java.util.NoSuchElementException;
@@ -103,7 +102,6 @@ public SortedMap<K, V> tailMap(@ParametricNullness K fromKey) {
103102
*
104103
* @since 15.0
105104
*/
106-
@Beta
107105
protected class StandardKeySet extends Maps.SortedKeySet<K, V> {
108106
/** Constructor for use by subclasses. */
109107
public StandardKeySet() {
@@ -130,7 +128,6 @@ static int unsafeCompare(
130128
* @since 7.0
131129
*/
132130
@Override
133-
@Beta
134131
protected boolean standardContainsKey(@CheckForNull Object key) {
135132
try {
136133
// any CCE or NPE will be caught
@@ -150,7 +147,6 @@ protected boolean standardContainsKey(@CheckForNull Object key) {
150147
*
151148
* @since 7.0
152149
*/
153-
@Beta
154150
protected SortedMap<K, V> standardSubMap(K fromKey, K toKey) {
155151
checkArgument(unsafeCompare(comparator(), fromKey, toKey) <= 0, "fromKey must be <= toKey");
156152
return tailMap(fromKey).headMap(toKey);

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

-2
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 java.util.Comparator;
2019
import java.util.Iterator;
@@ -44,7 +43,6 @@
4443
* @author Louis Wasserman
4544
* @since 15.0
4645
*/
47-
@Beta
4846
@GwtCompatible(emulated = true)
4947
@ElementTypesAreNonnullByDefault
5048
public abstract class ForwardingSortedMultiset<E extends @Nullable Object>

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

-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import static com.google.common.collect.ForwardingSortedMap.unsafeCompare;
2020

21-
import com.google.common.annotations.Beta;
2221
import com.google.common.annotations.GwtCompatible;
2322
import java.util.Comparator;
2423
import java.util.Iterator;
@@ -106,7 +105,6 @@ public SortedSet<E> tailSet(@ParametricNullness E fromElement) {
106105
* @since 7.0
107106
*/
108107
@Override
109-
@Beta
110108
protected boolean standardContains(@CheckForNull Object object) {
111109
try {
112110
// any ClassCastExceptions and NullPointerExceptions are caught
@@ -127,7 +125,6 @@ protected boolean standardContains(@CheckForNull Object object) {
127125
* @since 7.0
128126
*/
129127
@Override
130-
@Beta
131128
protected boolean standardRemove(@CheckForNull Object object) {
132129
try {
133130
// any ClassCastExceptions and NullPointerExceptions are caught
@@ -154,7 +151,6 @@ protected boolean standardRemove(@CheckForNull Object object) {
154151
*
155152
* @since 7.0
156153
*/
157-
@Beta
158154
protected SortedSet<E> standardSubSet(
159155
@ParametricNullness E fromElement, @ParametricNullness E toElement) {
160156
return tailSet(fromElement).headSet(toElement);

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

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

1717
package com.google.common.collect;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.errorprone.annotations.CanIgnoreReturnValue;
2221
import java.util.Collection;
@@ -204,7 +203,6 @@ protected ListIterator<E> standardListIterator() {
204203
*
205204
* @since 7.0
206205
*/
207-
@Beta
208206
protected ListIterator<E> standardListIterator(int start) {
209207
return Lists.listIteratorImpl(this, start);
210208
}
@@ -215,7 +213,6 @@ protected ListIterator<E> standardListIterator(int start) {
215213
*
216214
* @since 7.0
217215
*/
218-
@Beta
219216
protected List<E> standardSubList(int fromIndex, int toIndex) {
220217
return Lists.subListImpl(this, fromIndex, toIndex);
221218
}
@@ -227,7 +224,6 @@ protected List<E> standardSubList(int fromIndex, int toIndex) {
227224
*
228225
* @since 7.0
229226
*/
230-
@Beta
231227
protected boolean standardEquals(@CheckForNull Object object) {
232228
return Lists.equalsImpl(this, object);
233229
}
@@ -239,7 +235,6 @@ protected boolean standardEquals(@CheckForNull Object object) {
239235
*
240236
* @since 7.0
241237
*/
242-
@Beta
243238
protected int standardHashCode() {
244239
return Lists.hashCodeImpl(this);
245240
}

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

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

1717
package com.google.common.collect;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.common.base.Objects;
2221
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -163,7 +162,6 @@ protected void standardPutAll(Map<? extends K, ? extends V> map) {
163162
*
164163
* @since 7.0
165164
*/
166-
@Beta
167165
@CheckForNull
168166
protected V standardRemove(@CheckForNull Object key) {
169167
Iterator<Entry<K, V>> entryIterator = entrySet().iterator();
@@ -198,7 +196,6 @@ protected void standardClear() {
198196
*
199197
* @since 10.0
200198
*/
201-
@Beta
202199
protected class StandardKeySet extends Maps.KeySet<K, V> {
203200
/** Constructor for use by subclasses. */
204201
public StandardKeySet() {
@@ -213,7 +210,6 @@ public StandardKeySet() {
213210
*
214211
* @since 7.0
215212
*/
216-
@Beta
217213
protected boolean standardContainsKey(@CheckForNull Object key) {
218214
return Maps.containsKeyImpl(this, key);
219215
}
@@ -227,7 +223,6 @@ protected boolean standardContainsKey(@CheckForNull Object key) {
227223
*
228224
* @since 10.0
229225
*/
230-
@Beta
231226
protected class StandardValues extends Maps.Values<K, V> {
232227
/** Constructor for use by subclasses. */
233228
public StandardValues() {
@@ -255,7 +250,6 @@ protected boolean standardContainsValue(@CheckForNull Object value) {
255250
*
256251
* @since 10.0
257252
*/
258-
@Beta
259253
protected abstract class StandardEntrySet extends Maps.EntrySet<K, V> {
260254
/** Constructor for use by subclasses. */
261255
protected StandardEntrySet() {}

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

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

1717
package com.google.common.collect;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.common.base.Objects;
2221
import java.util.Map;
@@ -123,7 +122,6 @@ protected int standardHashCode() {
123122
*
124123
* @since 7.0
125124
*/
126-
@Beta
127125
protected String standardToString() {
128126
return getKey() + "=" + getValue();
129127
}

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

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

1717
package com.google.common.collect;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.common.base.Objects;
2221
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -138,7 +137,6 @@ protected void standardClear() {
138137
*
139138
* @since 7.0
140139
*/
141-
@Beta
142140
protected int standardCount(@CheckForNull Object object) {
143141
for (Entry<?> entry : this.entrySet()) {
144142
if (Objects.equal(entry.getElement(), object)) {
@@ -167,7 +165,6 @@ protected boolean standardAdd(@ParametricNullness E element) {
167165
*
168166
* @since 7.0
169167
*/
170-
@Beta
171168
@Override
172169
protected boolean standardAddAll(Collection<? extends E> elementsToAdd) {
173170
return Multisets.addAllImpl(this, elementsToAdd);
@@ -243,7 +240,6 @@ protected boolean standardSetCount(@ParametricNullness E element, int oldCount,
243240
*
244241
* @since 10.0
245242
*/
246-
@Beta
247243
protected class StandardElementSet extends Multisets.ElementSet<E> {
248244
/** Constructor for use by subclasses. */
249245
public StandardElementSet() {}

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

-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import static com.google.common.collect.Maps.keyOrNull;
2020

21-
import com.google.common.annotations.Beta;
2221
import com.google.common.annotations.GwtIncompatible;
2322
import java.util.Iterator;
2423
import java.util.NavigableMap;
@@ -301,7 +300,6 @@ public NavigableMap<K, V> descendingMap() {
301300
*
302301
* @since 12.0
303302
*/
304-
@Beta
305303
protected class StandardDescendingMap extends Maps.DescendingMap<K, V> {
306304
/** Constructor for use by subclasses. */
307305
public StandardDescendingMap() {}
@@ -365,7 +363,6 @@ public NavigableSet<K> navigableKeySet() {
365363
*
366364
* @since 12.0
367365
*/
368-
@Beta
369366
protected class StandardNavigableKeySet extends Maps.NavigableKeySet<K, V> {
370367
/** Constructor for use by subclasses. */
371368
public StandardNavigableKeySet() {
@@ -385,7 +382,6 @@ public NavigableSet<K> descendingKeySet() {
385382
* descendingMap}, you may wish to override {@code descendingKeySet} to forward to this
386383
* implementation.
387384
*/
388-
@Beta
389385
protected NavigableSet<K> standardDescendingKeySet() {
390386
return descendingMap().navigableKeySet();
391387
}

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

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

1717
package com.google.common.collect;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtIncompatible;
2120
import java.util.Iterator;
2221
import java.util.NavigableSet;
@@ -181,7 +180,6 @@ public NavigableSet<E> descendingSet() {
181180
*
182181
* @since 12.0
183182
*/
184-
@Beta
185183
protected class StandardDescendingSet extends Sets.DescendingSet<E> {
186184
/** Constructor for use by subclasses. */
187185
public StandardDescendingSet() {
@@ -208,7 +206,6 @@ public NavigableSet<E> subSet(
208206
* {@code headSet} and {@code tailSet} methods. In many cases, you may wish to override {@link
209207
* #subSet(Object, boolean, Object, boolean)} to forward to this implementation.
210208
*/
211-
@Beta
212209
protected NavigableSet<E> standardSubSet(
213210
@ParametricNullness E fromElement,
214211
boolean fromInclusive,

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

-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import static com.google.common.base.Preconditions.checkArgument;
2020

21-
import com.google.common.annotations.Beta;
2221
import com.google.common.annotations.GwtCompatible;
2322
import java.util.Comparator;
2423
import java.util.NoSuchElementException;
@@ -103,7 +102,6 @@ public SortedMap<K, V> tailMap(@ParametricNullness K fromKey) {
103102
*
104103
* @since 15.0
105104
*/
106-
@Beta
107105
protected class StandardKeySet extends Maps.SortedKeySet<K, V> {
108106
/** Constructor for use by subclasses. */
109107
public StandardKeySet() {
@@ -130,7 +128,6 @@ static int unsafeCompare(
130128
* @since 7.0
131129
*/
132130
@Override
133-
@Beta
134131
protected boolean standardContainsKey(@CheckForNull Object key) {
135132
try {
136133
// any CCE or NPE will be caught
@@ -150,7 +147,6 @@ protected boolean standardContainsKey(@CheckForNull Object key) {
150147
*
151148
* @since 7.0
152149
*/
153-
@Beta
154150
protected SortedMap<K, V> standardSubMap(K fromKey, K toKey) {
155151
checkArgument(unsafeCompare(comparator(), fromKey, toKey) <= 0, "fromKey must be <= toKey");
156152
return tailMap(fromKey).headMap(toKey);

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

-2
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 java.util.Comparator;
2019
import java.util.Iterator;
@@ -44,7 +43,6 @@
4443
* @author Louis Wasserman
4544
* @since 15.0
4645
*/
47-
@Beta
4846
@GwtCompatible(emulated = true)
4947
@ElementTypesAreNonnullByDefault
5048
public abstract class ForwardingSortedMultiset<E extends @Nullable Object>

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

-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import static com.google.common.collect.ForwardingSortedMap.unsafeCompare;
2020

21-
import com.google.common.annotations.Beta;
2221
import com.google.common.annotations.GwtCompatible;
2322
import java.util.Comparator;
2423
import java.util.Iterator;
@@ -106,7 +105,6 @@ public SortedSet<E> tailSet(@ParametricNullness E fromElement) {
106105
* @since 7.0
107106
*/
108107
@Override
109-
@Beta
110108
protected boolean standardContains(@CheckForNull Object object) {
111109
try {
112110
// any ClassCastExceptions and NullPointerExceptions are caught
@@ -127,7 +125,6 @@ protected boolean standardContains(@CheckForNull Object object) {
127125
* @since 7.0
128126
*/
129127
@Override
130-
@Beta
131128
protected boolean standardRemove(@CheckForNull Object object) {
132129
try {
133130
// any ClassCastExceptions and NullPointerExceptions are caught
@@ -154,7 +151,6 @@ protected boolean standardRemove(@CheckForNull Object object) {
154151
*
155152
* @since 7.0
156153
*/
157-
@Beta
158154
protected SortedSet<E> standardSubSet(
159155
@ParametricNullness E fromElement, @ParametricNullness E toElement) {
160156
return tailSet(fromElement).headSet(toElement);

0 commit comments

Comments
 (0)
Please sign in to comment.