Interface StreamableConverter<T,R>

Type Parameters:
T - the upstream type
R - the output type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface StreamableConverter<@NonNull T, @NonNull R>
Convenience interface and callback used by the Streamable.to(StreamableConverter) operator to turn an Streamable into another value fluently.
Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Applies a function to the upstream Streamable and returns a converted value of type R.
  • Method Details

    • apply

      R apply(@NonNull @NonNull Streamable<@NonNull T> upstream)
      Applies a function to the upstream Streamable and returns a converted value of type R.
      Parameters:
      upstream - the upstream Streamable instance
      Returns:
      the converted value