Interface ExceptionToLongFunction<T,E extends Exception>

Type Parameters:
T - the type of the object argument
E - the exception 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 ExceptionToLongFunction<T,E extends Exception>
A two-argument function which can throw an exception.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <R> ExceptionFunction<T,R,E>
    Returns a function which passes the result of this function through the given function.
    long
    apply(T t)
    Apply this function to the given arguments.
    default <T2> ExceptionToLongFunction<T2,E>
    compose(ExceptionFunction<? super T2,? extends T,? extends E> before)
    Returns a function which passes the result of the given function through this function.
  • Method Details

    • apply

      long apply(T t) throws E
      Apply this function to the given arguments.
      Parameters:
      t - the first argument
      Returns:
      the function result
      Throws:
      E - if an exception occurs
    • andThen

      default <R> ExceptionFunction<T,R,E> andThen(ExceptionLongFunction<R,E> after)
      Returns a function which passes the result of this function through the given function.
      Type Parameters:
      R - the result type
      Parameters:
      after - the function (must not be null)
      Returns:
      a function which passes the result of this function through the given function
    • compose

      default <T2> ExceptionToLongFunction<T2,E> compose(ExceptionFunction<? super T2,? extends T,? extends E> before)
      Returns a function which passes the result of the given function through this function.
      Type Parameters:
      T2 - the initial argument type
      Parameters:
      before - the function (must not be null)
      Returns:
      a function which passes the result of the given function through this function