Interface CheckedFunction<F,T,E extends Throwable>

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<F,T,E extends Throwable>
A function that can throw checked exceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <R> CheckedFunction<F,R,E>
    andThen(CheckedFunction<? super T,? extends R,? extends E> mapper)
    Returns a new CheckedFunction that maps the return value using mapper.
    apply(F from)
     
  • Method Details

    • apply

      T apply(F from) throws E
      Throws:
      E
    • andThen

      default <R> CheckedFunction<F,R,E> andThen(CheckedFunction<? super T,? extends R,? extends E> mapper)
      Returns a new CheckedFunction that maps the return value using mapper. For example: (x -> x).andThen(Object::toString).apply(1) => "1".