Interface Streams.FunctionWithIndex<T extends @Nullable Object,R extends @Nullable Object>

Enclosing class:
Streams

public static interface Streams.FunctionWithIndex<T extends @Nullable Object,R extends @Nullable Object>
An analogue of Function also accepting an index.

This interface is only intended for use by callers of Streams.mapWithIndex(Stream, FunctionWithIndex).

Since:
21.0 (but only since 33.4.0 in the Android flavor)
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(T from, long index)
    Applies this function to the given argument and its index within a stream.
  • Method Details

    • apply

      R apply(T from, long index)
      Applies this function to the given argument and its index within a stream.