Skip to content

Commit

Permalink
Remove @Beta from Forwarding[Foo] APIs.
Browse files Browse the repository at this point in the history
RELNOTES=`collect`: Remove `@Beta` from `Forwarding[Foo]` APIs.
PiperOrigin-RevId: 531512286
  • Loading branch information
kluever authored and Google Java Core Libraries committed May 12, 2023
1 parent cba0b0a commit 9760dbc
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.common.collect;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.util.Collection;
Expand Down Expand Up @@ -204,7 +203,6 @@ protected ListIterator<E> standardListIterator() {
*
* @since 7.0
*/
@Beta
protected ListIterator<E> standardListIterator(int start) {
return Lists.listIteratorImpl(this, start);
}
Expand All @@ -215,7 +213,6 @@ protected ListIterator<E> standardListIterator(int start) {
*
* @since 7.0
*/
@Beta
protected List<E> standardSubList(int fromIndex, int toIndex) {
return Lists.subListImpl(this, fromIndex, toIndex);
}
Expand All @@ -227,7 +224,6 @@ protected List<E> standardSubList(int fromIndex, int toIndex) {
*
* @since 7.0
*/
@Beta
protected boolean standardEquals(@CheckForNull Object object) {
return Lists.equalsImpl(this, object);
}
Expand All @@ -239,7 +235,6 @@ protected boolean standardEquals(@CheckForNull Object object) {
*
* @since 7.0
*/
@Beta
protected int standardHashCode() {
return Lists.hashCodeImpl(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.common.collect;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Objects;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand Down Expand Up @@ -163,7 +162,6 @@ protected void standardPutAll(Map<? extends K, ? extends V> map) {
*
* @since 7.0
*/
@Beta
@CheckForNull
protected V standardRemove(@CheckForNull Object key) {
Iterator<Entry<K, V>> entryIterator = entrySet().iterator();
Expand Down Expand Up @@ -198,7 +196,6 @@ protected void standardClear() {
*
* @since 10.0
*/
@Beta
protected class StandardKeySet extends Maps.KeySet<K, V> {
/** Constructor for use by subclasses. */
public StandardKeySet() {
Expand All @@ -213,7 +210,6 @@ public StandardKeySet() {
*
* @since 7.0
*/
@Beta
protected boolean standardContainsKey(@CheckForNull Object key) {
return Maps.containsKeyImpl(this, key);
}
Expand All @@ -227,7 +223,6 @@ protected boolean standardContainsKey(@CheckForNull Object key) {
*
* @since 10.0
*/
@Beta
protected class StandardValues extends Maps.Values<K, V> {
/** Constructor for use by subclasses. */
public StandardValues() {
Expand Down Expand Up @@ -255,7 +250,6 @@ protected boolean standardContainsValue(@CheckForNull Object value) {
*
* @since 10.0
*/
@Beta
protected abstract class StandardEntrySet extends Maps.EntrySet<K, V> {
/** Constructor for use by subclasses. */
protected StandardEntrySet() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.common.collect;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Objects;
import java.util.Map;
Expand Down Expand Up @@ -123,7 +122,6 @@ protected int standardHashCode() {
*
* @since 7.0
*/
@Beta
protected String standardToString() {
return getKey() + "=" + getValue();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.common.collect;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Objects;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand Down Expand Up @@ -138,7 +137,6 @@ protected void standardClear() {
*
* @since 7.0
*/
@Beta
protected int standardCount(@CheckForNull Object object) {
for (Entry<?> entry : this.entrySet()) {
if (Objects.equal(entry.getElement(), object)) {
Expand Down Expand Up @@ -167,7 +165,6 @@ protected boolean standardAdd(@ParametricNullness E element) {
*
* @since 7.0
*/
@Beta
@Override
protected boolean standardAddAll(Collection<? extends E> elementsToAdd) {
return Multisets.addAllImpl(this, elementsToAdd);
Expand Down Expand Up @@ -243,7 +240,6 @@ protected boolean standardSetCount(@ParametricNullness E element, int oldCount,
*
* @since 10.0
*/
@Beta
protected class StandardElementSet extends Multisets.ElementSet<E> {
/** Constructor for use by subclasses. */
public StandardElementSet() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

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

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import java.util.Iterator;
import java.util.NavigableMap;
Expand Down Expand Up @@ -300,7 +299,6 @@ public NavigableMap<K, V> descendingMap() {
*
* @since 12.0
*/
@Beta
protected class StandardDescendingMap extends Maps.DescendingMap<K, V> {
/** Constructor for use by subclasses. */
public StandardDescendingMap() {}
Expand Down Expand Up @@ -359,7 +357,6 @@ public NavigableSet<K> navigableKeySet() {
*
* @since 12.0
*/
@Beta
protected class StandardNavigableKeySet extends Maps.NavigableKeySet<K, V> {
/** Constructor for use by subclasses. */
public StandardNavigableKeySet() {
Expand All @@ -379,7 +376,6 @@ public NavigableSet<K> descendingKeySet() {
* descendingMap}, you may wish to override {@code descendingKeySet} to forward to this
* implementation.
*/
@Beta
protected NavigableSet<K> standardDescendingKeySet() {
return descendingMap().navigableKeySet();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.common.collect;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import java.util.Iterator;
import java.util.NavigableSet;
Expand Down Expand Up @@ -181,7 +180,6 @@ public NavigableSet<E> descendingSet() {
*
* @since 12.0
*/
@Beta
protected class StandardDescendingSet extends Sets.DescendingSet<E> {
/** Constructor for use by subclasses. */
public StandardDescendingSet() {
Expand All @@ -208,7 +206,6 @@ public NavigableSet<E> subSet(
* {@code headSet} and {@code tailSet} methods. In many cases, you may wish to override {@link
* #subSet(Object, boolean, Object, boolean)} to forward to this implementation.
*/
@Beta
protected NavigableSet<E> standardSubSet(
@ParametricNullness E fromElement,
boolean fromInclusive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

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

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import java.util.Comparator;
import java.util.NoSuchElementException;
Expand Down Expand Up @@ -103,7 +102,6 @@ public SortedMap<K, V> tailMap(@ParametricNullness K fromKey) {
*
* @since 15.0
*/
@Beta
protected class StandardKeySet extends Maps.SortedKeySet<K, V> {
/** Constructor for use by subclasses. */
public StandardKeySet() {
Expand All @@ -130,7 +128,6 @@ static int unsafeCompare(
* @since 7.0
*/
@Override
@Beta
protected boolean standardContainsKey(@CheckForNull Object key) {
try {
// any CCE or NPE will be caught
Expand All @@ -150,7 +147,6 @@ protected boolean standardContainsKey(@CheckForNull Object key) {
*
* @since 7.0
*/
@Beta
protected SortedMap<K, V> standardSubMap(K fromKey, K toKey) {
checkArgument(unsafeCompare(comparator(), fromKey, toKey) <= 0, "fromKey must be <= toKey");
return tailMap(fromKey).headMap(toKey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.google.common.collect;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import java.util.Comparator;
import java.util.Iterator;
Expand Down Expand Up @@ -44,7 +43,6 @@
* @author Louis Wasserman
* @since 15.0
*/
@Beta
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
public abstract class ForwardingSortedMultiset<E extends @Nullable Object>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

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

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import java.util.Comparator;
import java.util.Iterator;
Expand Down Expand Up @@ -106,7 +105,6 @@ public SortedSet<E> tailSet(@ParametricNullness E fromElement) {
* @since 7.0
*/
@Override
@Beta
protected boolean standardContains(@CheckForNull Object object) {
try {
// any ClassCastExceptions and NullPointerExceptions are caught
Expand All @@ -127,7 +125,6 @@ protected boolean standardContains(@CheckForNull Object object) {
* @since 7.0
*/
@Override
@Beta
protected boolean standardRemove(@CheckForNull Object object) {
try {
// any ClassCastExceptions and NullPointerExceptions are caught
Expand All @@ -154,7 +151,6 @@ protected boolean standardRemove(@CheckForNull Object object) {
*
* @since 7.0
*/
@Beta
protected SortedSet<E> standardSubSet(
@ParametricNullness E fromElement, @ParametricNullness E toElement) {
return tailSet(fromElement).headSet(toElement);
Expand Down
5 changes: 0 additions & 5 deletions guava/src/com/google/common/collect/ForwardingList.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.common.collect;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.util.Collection;
Expand Down Expand Up @@ -204,7 +203,6 @@ protected ListIterator<E> standardListIterator() {
*
* @since 7.0
*/
@Beta
protected ListIterator<E> standardListIterator(int start) {
return Lists.listIteratorImpl(this, start);
}
Expand All @@ -215,7 +213,6 @@ protected ListIterator<E> standardListIterator(int start) {
*
* @since 7.0
*/
@Beta
protected List<E> standardSubList(int fromIndex, int toIndex) {
return Lists.subListImpl(this, fromIndex, toIndex);
}
Expand All @@ -227,7 +224,6 @@ protected List<E> standardSubList(int fromIndex, int toIndex) {
*
* @since 7.0
*/
@Beta
protected boolean standardEquals(@CheckForNull Object object) {
return Lists.equalsImpl(this, object);
}
Expand All @@ -239,7 +235,6 @@ protected boolean standardEquals(@CheckForNull Object object) {
*
* @since 7.0
*/
@Beta
protected int standardHashCode() {
return Lists.hashCodeImpl(this);
}
Expand Down
6 changes: 0 additions & 6 deletions guava/src/com/google/common/collect/ForwardingMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.common.collect;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Objects;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand Down Expand Up @@ -163,7 +162,6 @@ protected void standardPutAll(Map<? extends K, ? extends V> map) {
*
* @since 7.0
*/
@Beta
@CheckForNull
protected V standardRemove(@CheckForNull Object key) {
Iterator<Entry<K, V>> entryIterator = entrySet().iterator();
Expand Down Expand Up @@ -198,7 +196,6 @@ protected void standardClear() {
*
* @since 10.0
*/
@Beta
protected class StandardKeySet extends Maps.KeySet<K, V> {
/** Constructor for use by subclasses. */
public StandardKeySet() {
Expand All @@ -213,7 +210,6 @@ public StandardKeySet() {
*
* @since 7.0
*/
@Beta
protected boolean standardContainsKey(@CheckForNull Object key) {
return Maps.containsKeyImpl(this, key);
}
Expand All @@ -227,7 +223,6 @@ protected boolean standardContainsKey(@CheckForNull Object key) {
*
* @since 10.0
*/
@Beta
protected class StandardValues extends Maps.Values<K, V> {
/** Constructor for use by subclasses. */
public StandardValues() {
Expand Down Expand Up @@ -255,7 +250,6 @@ protected boolean standardContainsValue(@CheckForNull Object value) {
*
* @since 10.0
*/
@Beta
protected abstract class StandardEntrySet extends Maps.EntrySet<K, V> {
/** Constructor for use by subclasses. */
protected StandardEntrySet() {}
Expand Down
2 changes: 0 additions & 2 deletions guava/src/com/google/common/collect/ForwardingMapEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.common.collect;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Objects;
import java.util.Map;
Expand Down Expand Up @@ -123,7 +122,6 @@ protected int standardHashCode() {
*
* @since 7.0
*/
@Beta
protected String standardToString() {
return getKey() + "=" + getValue();
}
Expand Down
Loading

0 comments on commit 9760dbc

Please sign in to comment.