Interface ITypedThrowingSupplier<T,​E extends Throwable>

  • Type Parameters:
    T - The type of results supplied by this supplier.
    E - The type of exception that may be thrown.
    All Superinterfaces:
    Supplier<T>
    All Known Subinterfaces:
    IThrowingSupplier<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 ITypedThrowingSupplier<T,​E extends Throwable>
    extends Supplier<T>
    A Supplier that may throw a single typed checked exception.

    Represents a supplier of results.

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

    This is a functional interface whose functional method is tryGet().

    Since:
    8.2.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • get

        default T get()
        Specified by:
        get in interface Supplier<T>
      • tryGet

        T tryGet()
          throws E extends Throwable
        Gets a result.
        Returns:
        The result
        Throws:
        E - When this operation fails.
        E extends Throwable