Skip to content

Commit

Permalink
Remove @Beta from various primitive-related APIs.
Browse files Browse the repository at this point in the history
RELNOTES=`primitive`: Remove `@Beta` from various `primitive`-related APIs.
PiperOrigin-RevId: 531526245
  • Loading branch information
kluever authored and Google Java Core Libraries committed May 12, 2023
1 parent e5e0f66 commit ab4302a
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 56 deletions.
4 changes: 0 additions & 4 deletions android/guava/src/com/google/common/primitives/Booleans.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkPositionIndexes;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import java.io.Serializable;
import java.util.AbstractList;
Expand Down Expand Up @@ -80,7 +79,6 @@ public String toString() {
*
* @since 21.0
*/
@Beta
public static Comparator<Boolean> trueFirst() {
return BooleanComparator.TRUE_FIRST;
}
Expand All @@ -93,7 +91,6 @@ public static Comparator<Boolean> trueFirst() {
*
* @since 21.0
*/
@Beta
public static Comparator<Boolean> falseFirst() {
return BooleanComparator.FALSE_FIRST;
}
Expand Down Expand Up @@ -511,7 +508,6 @@ boolean[] toBooleanArray() {
*
* @since 16.0
*/
@Beta
public static int countTrue(boolean... values) {
int count = 0;
for (boolean value : values) {
Expand Down
2 changes: 0 additions & 2 deletions android/guava/src/com/google/common/primitives/Chars.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkPositionIndexes;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import java.io.Serializable;
Expand Down Expand Up @@ -258,7 +257,6 @@ public static char max(char... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static char constrainToRange(char value, char min, char max) {
checkArgument(min <= max, "min (%s) must be less than or equal to max (%s)", min, max);
return value < min ? min : value < max ? value : max;
Expand Down
3 changes: 0 additions & 3 deletions android/guava/src/com/google/common/primitives/Doubles.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import static java.lang.Double.NEGATIVE_INFINITY;
import static java.lang.Double.POSITIVE_INFINITY;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
Expand Down Expand Up @@ -254,7 +253,6 @@ public static double max(double... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static double constrainToRange(double value, double min, double max) {
// avoid auto-boxing by not using Preconditions.checkArgument(); see Guava issue 3984
// Reject NaN by testing for the good case (min <= max) instead of the bad (min > max).
Expand Down Expand Up @@ -319,7 +317,6 @@ private Object readResolve() {
*
* @since 16.0
*/
@Beta
public static Converter<String, Double> stringConverter() {
return DoubleConverter.INSTANCE;
}
Expand Down
3 changes: 0 additions & 3 deletions android/guava/src/com/google/common/primitives/Floats.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import static java.lang.Float.NEGATIVE_INFINITY;
import static java.lang.Float.POSITIVE_INFINITY;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
Expand Down Expand Up @@ -251,7 +250,6 @@ public static float max(float... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static float constrainToRange(float value, float min, float max) {
// avoid auto-boxing by not using Preconditions.checkArgument(); see Guava issue 3984
// Reject NaN by testing for the good case (min <= max) instead of the bad (min > max).
Expand Down Expand Up @@ -316,7 +314,6 @@ private Object readResolve() {
*
* @since 16.0
*/
@Beta
public static Converter<String, Float> stringConverter() {
return FloatConverter.INSTANCE;
}
Expand Down
3 changes: 0 additions & 3 deletions android/guava/src/com/google/common/primitives/Ints.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkPositionIndexes;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.Converter;
Expand Down Expand Up @@ -267,7 +266,6 @@ public static int max(int... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static int constrainToRange(int value, int min, int max) {
checkArgument(min <= max, "min (%s) must be less than or equal to max (%s)", min, max);
return Math.min(Math.max(value, min), max);
Expand Down Expand Up @@ -372,7 +370,6 @@ private Object readResolve() {
*
* @since 16.0
*/
@Beta
public static Converter<String, Integer> stringConverter() {
return IntConverter.INSTANCE;
}
Expand Down
3 changes: 0 additions & 3 deletions android/guava/src/com/google/common/primitives/Longs.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkPositionIndexes;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Converter;
import java.io.Serializable;
Expand Down Expand Up @@ -234,7 +233,6 @@ public static long max(long... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static long constrainToRange(long value, long min, long max) {
checkArgument(min <= max, "min (%s) must be less than or equal to max (%s)", min, max);
return Math.min(Math.max(value, min), max);
Expand Down Expand Up @@ -465,7 +463,6 @@ private Object readResolve() {
*
* @since 16.0
*/
@Beta
public static Converter<String, Long> stringConverter() {
return LongConverter.INSTANCE;
}
Expand Down
3 changes: 0 additions & 3 deletions android/guava/src/com/google/common/primitives/Shorts.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkPositionIndexes;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.Converter;
Expand Down Expand Up @@ -266,7 +265,6 @@ public static short max(short... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static short constrainToRange(short value, short min, short max) {
checkArgument(min <= max, "min (%s) must be less than or equal to max (%s)", min, max);
return value < min ? min : value < max ? value : max;
Expand Down Expand Up @@ -372,7 +370,6 @@ private Object readResolve() {
*
* @since 16.0
*/
@Beta
public static Converter<String, Short> stringConverter() {
return ShortConverter.INSTANCE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.base.Preconditions.checkPositionIndexes;
import static java.util.Objects.requireNonNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.annotations.VisibleForTesting;
Expand Down Expand Up @@ -169,7 +168,6 @@ public static byte max(byte... array) {
*
* @since 13.0
*/
@Beta
public static String toString(byte x) {
return toString(x, 10);
}
Expand All @@ -184,7 +182,6 @@ public static String toString(byte x) {
* and {@link Character#MAX_RADIX}.
* @since 13.0
*/
@Beta
public static String toString(byte x, int radix) {
checkArgument(
radix >= Character.MIN_RADIX && radix <= Character.MAX_RADIX,
Expand All @@ -203,7 +200,6 @@ public static String toString(byte x, int radix) {
* Byte#parseByte(String)})
* @since 13.0
*/
@Beta
@CanIgnoreReturnValue
public static byte parseUnsignedByte(String string) {
return parseUnsignedByte(string, 10);
Expand All @@ -221,7 +217,6 @@ public static byte parseUnsignedByte(String string) {
* Byte#parseByte(String)})
* @since 13.0
*/
@Beta
@CanIgnoreReturnValue
public static byte parseUnsignedByte(String string, int radix) {
int parse = Integer.parseInt(checkNotNull(string), radix);
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.checkNotNull;
import static com.google.common.base.Preconditions.checkPositionIndexes;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.util.Arrays;
Expand All @@ -45,7 +44,6 @@
* @author Louis Wasserman
* @since 11.0
*/
@Beta
@GwtCompatible
@ElementTypesAreNonnullByDefault
public final class UnsignedInts {
Expand Down
4 changes: 0 additions & 4 deletions guava/src/com/google/common/primitives/Booleans.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkPositionIndexes;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import java.io.Serializable;
import java.util.AbstractList;
Expand Down Expand Up @@ -80,7 +79,6 @@ public String toString() {
*
* @since 21.0
*/
@Beta
public static Comparator<Boolean> trueFirst() {
return BooleanComparator.TRUE_FIRST;
}
Expand All @@ -93,7 +91,6 @@ public static Comparator<Boolean> trueFirst() {
*
* @since 21.0
*/
@Beta
public static Comparator<Boolean> falseFirst() {
return BooleanComparator.FALSE_FIRST;
}
Expand Down Expand Up @@ -511,7 +508,6 @@ boolean[] toBooleanArray() {
*
* @since 16.0
*/
@Beta
public static int countTrue(boolean... values) {
int count = 0;
for (boolean value : values) {
Expand Down
2 changes: 0 additions & 2 deletions guava/src/com/google/common/primitives/Chars.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkPositionIndexes;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import java.io.Serializable;
Expand Down Expand Up @@ -258,7 +257,6 @@ public static char max(char... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static char constrainToRange(char value, char min, char max) {
checkArgument(min <= max, "min (%s) must be less than or equal to max (%s)", min, max);
return value < min ? min : value < max ? value : max;
Expand Down
3 changes: 0 additions & 3 deletions guava/src/com/google/common/primitives/Doubles.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import static java.lang.Double.NEGATIVE_INFINITY;
import static java.lang.Double.POSITIVE_INFINITY;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
Expand Down Expand Up @@ -256,7 +255,6 @@ public static double max(double... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static double constrainToRange(double value, double min, double max) {
// avoid auto-boxing by not using Preconditions.checkArgument(); see Guava issue 3984
// Reject NaN by testing for the good case (min <= max) instead of the bad (min > max).
Expand Down Expand Up @@ -321,7 +319,6 @@ private Object readResolve() {
*
* @since 16.0
*/
@Beta
public static Converter<String, Double> stringConverter() {
return DoubleConverter.INSTANCE;
}
Expand Down
3 changes: 0 additions & 3 deletions guava/src/com/google/common/primitives/Floats.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import static java.lang.Float.NEGATIVE_INFINITY;
import static java.lang.Float.POSITIVE_INFINITY;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
Expand Down Expand Up @@ -251,7 +250,6 @@ public static float max(float... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static float constrainToRange(float value, float min, float max) {
// avoid auto-boxing by not using Preconditions.checkArgument(); see Guava issue 3984
// Reject NaN by testing for the good case (min <= max) instead of the bad (min > max).
Expand Down Expand Up @@ -316,7 +314,6 @@ private Object readResolve() {
*
* @since 16.0
*/
@Beta
public static Converter<String, Float> stringConverter() {
return FloatConverter.INSTANCE;
}
Expand Down
3 changes: 0 additions & 3 deletions guava/src/com/google/common/primitives/Ints.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkPositionIndexes;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.Converter;
Expand Down Expand Up @@ -269,7 +268,6 @@ public static int max(int... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static int constrainToRange(int value, int min, int max) {
checkArgument(min <= max, "min (%s) must be less than or equal to max (%s)", min, max);
return Math.min(Math.max(value, min), max);
Expand Down Expand Up @@ -374,7 +372,6 @@ private Object readResolve() {
*
* @since 16.0
*/
@Beta
public static Converter<String, Integer> stringConverter() {
return IntConverter.INSTANCE;
}
Expand Down
3 changes: 0 additions & 3 deletions guava/src/com/google/common/primitives/Longs.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkPositionIndexes;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Converter;
import java.io.Serializable;
Expand Down Expand Up @@ -236,7 +235,6 @@ public static long max(long... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static long constrainToRange(long value, long min, long max) {
checkArgument(min <= max, "min (%s) must be less than or equal to max (%s)", min, max);
return Math.min(Math.max(value, min), max);
Expand Down Expand Up @@ -467,7 +465,6 @@ private Object readResolve() {
*
* @since 16.0
*/
@Beta
public static Converter<String, Long> stringConverter() {
return LongConverter.INSTANCE;
}
Expand Down
3 changes: 0 additions & 3 deletions guava/src/com/google/common/primitives/Shorts.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkPositionIndexes;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.Converter;
Expand Down Expand Up @@ -266,7 +265,6 @@ public static short max(short... array) {
* @throws IllegalArgumentException if {@code min > max}
* @since 21.0
*/
@Beta
public static short constrainToRange(short value, short min, short max) {
checkArgument(min <= max, "min (%s) must be less than or equal to max (%s)", min, max);
return value < min ? min : value < max ? value : max;
Expand Down Expand Up @@ -372,7 +370,6 @@ private Object readResolve() {
*
* @since 16.0
*/
@Beta
public static Converter<String, Short> stringConverter() {
return ShortConverter.INSTANCE;
}
Expand Down
Loading

0 comments on commit ab4302a

Please sign in to comment.