Interface ITypedThrowingFunction<T,​R,​E extends Throwable>

  • Type Parameters:
    T - The type of the argument expected by this function.
    R - The type of results returned by this function.
    E - The type of exception that may be thrown.
    All Superinterfaces:
    Function<T,​R>
    All Known Subinterfaces:
    ISerializableThrowingFunction<T,​R>, IThrowingFunction<T,​R>, IThrowingUnaryOperator<T>
    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 ITypedThrowingFunction<T,​R,​E extends Throwable>
    extends Function<T,​R>
    A Function that may throw a single typed checked exception.

    Represents a function that accepts one argument and produces a result.

    There is no requirement that a new or distinct result be returned each time the function is invoked.

    This is a functional interface whose functional method is tryApply(Object).

    Since:
    8.3.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • apply

        default R apply​(T t)
        Specified by:
        apply in interface Function<T,​R>
      • tryApply

        R tryApply​(T t)
            throws E extends Throwable
        Gets a result.
        Parameters:
        t - The function argument
        Returns:
        The function result.
        Throws:
        E - When this operation fails.
        E extends Throwable