Skip to content

Commit

Permalink
Remove @Beta from Streams methods mapWithIndex and findLast.
Browse files Browse the repository at this point in the history
RELNOTES=`collect`: Removed `@Beta` from `Streams` methods `mapWithIndex` and `findLast`.
PiperOrigin-RevId: 419831941
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Jan 5, 2022
1 parent 3a5ef50 commit 8079a29
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions guava/src/com/google/common/collect/Streams.java
Expand Up @@ -425,7 +425,6 @@ private static class TemporaryPair<A extends @Nullable Object, B extends @Nullab
* <p>The order of the resulting stream is defined if and only if the order of the original stream
* was defined.
*/
@Beta
public static <T extends @Nullable Object, R extends @Nullable Object> Stream<R> mapWithIndex(
Stream<T> stream, FunctionWithIndex<? super T, ? extends R> function) {
checkNotNull(stream);
Expand Down Expand Up @@ -509,7 +508,6 @@ Splitr createSplit(Spliterator<T> from, long i) {
* <p>The order of the resulting stream is defined if and only if the order of the original stream
* was defined.
*/
@Beta
public static <R extends @Nullable Object> Stream<R> mapWithIndex(
IntStream stream, IntFunctionWithIndex<R> function) {
checkNotNull(stream);
Expand Down Expand Up @@ -589,7 +587,6 @@ Splitr createSplit(Spliterator.OfInt from, long i) {
* <p>The order of the resulting stream is defined if and only if the order of the original stream
* was defined.
*/
@Beta
public static <R extends @Nullable Object> Stream<R> mapWithIndex(
LongStream stream, LongFunctionWithIndex<R> function) {
checkNotNull(stream);
Expand Down Expand Up @@ -669,7 +666,6 @@ Splitr createSplit(Spliterator.OfLong from, long i) {
* <p>The order of the resulting stream is defined if and only if the order of the original stream
* was defined.
*/
@Beta
public static <R extends @Nullable Object> Stream<R> mapWithIndex(
DoubleStream stream, DoubleFunctionWithIndex<R> function) {
checkNotNull(stream);
Expand Down Expand Up @@ -735,7 +731,6 @@ Splitr createSplit(Spliterator.OfDouble from, long i) {
*
* @since 21.0
*/
@Beta
public interface FunctionWithIndex<T extends @Nullable Object, R extends @Nullable Object> {
/** Applies this function to the given argument and its index within a stream. */
@ParametricNullness
Expand Down Expand Up @@ -791,7 +786,6 @@ public int characteristics() {
*
* @since 21.0
*/
@Beta
public interface IntFunctionWithIndex<R extends @Nullable Object> {
/** Applies this function to the given argument and its index within a stream. */
@ParametricNullness
Expand All @@ -806,7 +800,6 @@ public interface IntFunctionWithIndex<R extends @Nullable Object> {
*
* @since 21.0
*/
@Beta
public interface LongFunctionWithIndex<R extends @Nullable Object> {
/** Applies this function to the given argument and its index within a stream. */
@ParametricNullness
Expand All @@ -821,7 +814,6 @@ public interface LongFunctionWithIndex<R extends @Nullable Object> {
*
* @since 21.0
*/
@Beta
public interface DoubleFunctionWithIndex<R extends @Nullable Object> {
/** Applies this function to the given argument and its index within a stream. */
@ParametricNullness
Expand Down Expand Up @@ -853,7 +845,6 @@ public interface DoubleFunctionWithIndex<R extends @Nullable Object> {
* split has a last element of null, so throw NPE" from "the final split was empty, so look for an
* element in the prior one.")
*/
@Beta
public static <T> java.util.Optional<T> findLast(Stream<T> stream) {
class OptionalState {
boolean set = false;
Expand Down Expand Up @@ -932,7 +923,6 @@ T get() {
* @see IntStream#findFirst()
* @throws NullPointerException if the last element of the stream is null
*/
@Beta
public static OptionalInt findLast(IntStream stream) {
// findLast(Stream) does some allocation, so we might as well box some more
java.util.Optional<Integer> boxedLast = findLast(stream.boxed());
Expand All @@ -951,7 +941,6 @@ public static OptionalInt findLast(IntStream stream) {
* @see LongStream#findFirst()
* @throws NullPointerException if the last element of the stream is null
*/
@Beta
public static OptionalLong findLast(LongStream stream) {
// findLast(Stream) does some allocation, so we might as well box some more
java.util.Optional<Long> boxedLast = findLast(stream.boxed());
Expand All @@ -970,7 +959,6 @@ public static OptionalLong findLast(LongStream stream) {
* @see DoubleStream#findFirst()
* @throws NullPointerException if the last element of the stream is null
*/
@Beta
public static OptionalDouble findLast(DoubleStream stream) {
// findLast(Stream) does some allocation, so we might as well box some more
java.util.Optional<Double> boxedLast = findLast(stream.boxed());
Expand Down

0 comments on commit 8079a29

Please sign in to comment.