Skip to content

Commit

Permalink
Remove @Beta from the remaining methods in Comparators: min, `m…
Browse files Browse the repository at this point in the history
…ax`, `lexicographical`, `emptiesFirst`, `emptiesLast`, `isInOrder`, `isInStrictOrder`.

RELNOTES=`collect`: Removed `@Beta` from the remaining methods in `Comparators`: `min`, `max`, `lexicographical`, `emptiesFirst`, `emptiesLast`, `isInOrder`, `isInStrictOrder`.
PiperOrigin-RevId: 417399872
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Dec 20, 2021
1 parent eb0b033 commit a3e411c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
6 changes: 0 additions & 6 deletions android/guava/src/com/google/common/collect/Comparators.java
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 com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import java.util.Comparator;
import java.util.Iterator;
Expand All @@ -39,7 +38,6 @@
* @since 21.0
* @author Louis Wasserman
*/
@Beta
@GwtCompatible
@ElementTypesAreNonnullByDefault
public final class Comparators {
Expand Down Expand Up @@ -121,7 +119,6 @@ private Comparators() {}
* @throws ClassCastException if the parameters are not <i>mutually comparable</i>.
* @since 30.0
*/
@Beta
public static <T extends Comparable<? super T>> T min(T a, T b) {
return (a.compareTo(b) <= 0) ? a : b;
}
Expand All @@ -141,7 +138,6 @@ public static <T extends Comparable<? super T>> T min(T a, T b) {
* comparator.
* @since 30.0
*/
@Beta
@ParametricNullness
public static <T extends @Nullable Object> T min(
@ParametricNullness T a, @ParametricNullness T b, Comparator<T> comparator) {
Expand All @@ -161,7 +157,6 @@ public static <T extends Comparable<? super T>> T min(T a, T b) {
* @throws ClassCastException if the parameters are not <i>mutually comparable</i>.
* @since 30.0
*/
@Beta
public static <T extends Comparable<? super T>> T max(T a, T b) {
return (a.compareTo(b) >= 0) ? a : b;
}
Expand All @@ -181,7 +176,6 @@ public static <T extends Comparable<? super T>> T max(T a, T b) {
* comparator.
* @since 30.0
*/
@Beta
@ParametricNullness
public static <T extends @Nullable Object> T max(
@ParametricNullness T a, @ParametricNullness T b, Comparator<T> comparator) {
Expand Down
10 changes: 0 additions & 10 deletions guava/src/com/google/common/collect/Comparators.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.collect.CollectPreconditions.checkNonnegative;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import java.util.Comparator;
import java.util.Iterator;
Expand Down Expand Up @@ -62,7 +61,6 @@ private Comparators() {}
// Note: 90% of the time we don't add type parameters or wildcards that serve only to "tweak" the
// desired return type. However, *nested* generics introduce a special class of problems that we
// think tip it over into being worthwhile.
@Beta
public static <T extends @Nullable Object, S extends T> Comparator<Iterable<S>> lexicographical(
Comparator<T> comparator) {
return new LexicographicalOrdering<S>(checkNotNull(comparator));
Expand All @@ -73,7 +71,6 @@ private Comparators() {}
* equal to the element that preceded it, according to the specified comparator. Note that this is
* always true when the iterable has fewer than two elements.
*/
@Beta
public static <T extends @Nullable Object> boolean isInOrder(
Iterable<? extends T> iterable, Comparator<T> comparator) {
checkNotNull(comparator);
Expand All @@ -96,7 +93,6 @@ private Comparators() {}
* greater than the element that preceded it, according to the specified comparator. Note that
* this is always true when the iterable has fewer than two elements.
*/
@Beta
public static <T extends @Nullable Object> boolean isInStrictOrder(
Iterable<? extends T> iterable, Comparator<T> comparator) {
checkNotNull(comparator);
Expand Down Expand Up @@ -178,7 +174,6 @@ private Comparators() {}
*
* @since 22.0
*/
@Beta
public static <T> Comparator<Optional<T>> emptiesFirst(Comparator<? super T> valueComparator) {
checkNotNull(valueComparator);
return Comparator.<Optional<T>, @Nullable T>comparing(
Expand All @@ -192,7 +187,6 @@ public static <T> Comparator<Optional<T>> emptiesFirst(Comparator<? super T> val
*
* @since 22.0
*/
@Beta
public static <T> Comparator<Optional<T>> emptiesLast(Comparator<? super T> valueComparator) {
checkNotNull(valueComparator);
return Comparator.<Optional<T>, @Nullable T>comparing(
Expand All @@ -212,7 +206,6 @@ public static <T> Comparator<Optional<T>> emptiesLast(Comparator<? super T> valu
* @throws ClassCastException if the parameters are not <i>mutually comparable</i>.
* @since 30.0
*/
@Beta
public static <T extends Comparable<? super T>> T min(T a, T b) {
return (a.compareTo(b) <= 0) ? a : b;
}
Expand All @@ -232,7 +225,6 @@ public static <T extends Comparable<? super T>> T min(T a, T b) {
* comparator.
* @since 30.0
*/
@Beta
@ParametricNullness
public static <T extends @Nullable Object> T min(
@ParametricNullness T a, @ParametricNullness T b, Comparator<T> comparator) {
Expand All @@ -252,7 +244,6 @@ public static <T extends Comparable<? super T>> T min(T a, T b) {
* @throws ClassCastException if the parameters are not <i>mutually comparable</i>.
* @since 30.0
*/
@Beta
public static <T extends Comparable<? super T>> T max(T a, T b) {
return (a.compareTo(b) >= 0) ? a : b;
}
Expand All @@ -272,7 +263,6 @@ public static <T extends Comparable<? super T>> T max(T a, T b) {
* comparator.
* @since 30.0
*/
@Beta
@ParametricNullness
public static <T extends @Nullable Object> T max(
@ParametricNullness T a, @ParametricNullness T b, Comparator<T> comparator) {
Expand Down

0 comments on commit a3e411c

Please sign in to comment.