Interface CheckedFunction<T,​R>

  • Type Parameters:
    T - Functional parameter
    R - Functional parameter
    All Superinterfaces:
    Serializable
    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 CheckedFunction<T,​R>
    extends Serializable
    Version of Function that is serializable and checked
    • Method Detail

      • apply

        R apply​(T t)
         throws Throwable
        Apply r.
        Parameters:
        t - the t
        Returns:
        the r
        Throws:
        Throwable - the throwable
      • asConsumer

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

        static <T> CheckedConsumer<T> asConsumer​(CheckedFunction<T,​?> function)
        As consumer serializable consumer.
        Returns:
        the serializable consumer
      • literal

        static <T,​R> CheckedFunction<T,​R> literal​(R returnValue)
      • compose

        default <V> CheckedFunction<V,​R> compose​(CheckedFunction<? super V,​? extends T> before)
        Compose checked function.
        Type Parameters:
        V - the type parameter
        Parameters:
        before - the before
        Returns:
        the checked function
      • andThen

        default <V> CheckedFunction<T,​V> andThen​(CheckedFunction<? super R,​? extends V> after)
        And then checked function.
        Type Parameters:
        V - the type parameter
        Parameters:
        after - the after
        Returns:
        the checked function
      • identity

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