Interface SerializableFunction<T,​R>

  • Type Parameters:
    T - Functional parameter
    R - Functional parameter
    All Superinterfaces:
    Function<T,​R>, Serializable
    All Known Implementing Classes:
    Funcs.When, StringFunctions, Switch
    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 SerializableFunction<T,​R>
    extends Function<T,​R>, Serializable
    Version of Function that is serializable
    • Method Detail

      • asConsumer

        default SerializableConsumer<T> asConsumer()
        As consumer serializable consumer.
        Returns:
        the serializable consumer
      • andThen

        default <F> SerializableFunction<T,​F> andThen​(SerializableFunction<? super R,​? extends F> function)
        And then serializable function.
        Type Parameters:
        F - the type parameter
        Parameters:
        function - the function
        Returns:
        the serializable function
      • compose

        default <V> SerializableFunction<V,​R> compose​(SerializableFunction<? super V,​? extends T> function)
        Compose serializable function.
        Type Parameters:
        V - the type parameter
        Parameters:
        function - the function
        Returns:
        the serializable function
      • identity

        static <T> SerializableFunction<T,​T> identity()
        Identity serializable function.
        Type Parameters:
        T - the type parameter
        Returns:
        the serializable function