Package org.apache.commons.lang3.function

# Interface FailableSupplier<T,E extends Throwable>

Type Parameters:
  `T` - The type of results supplied by this supplier.
  `E` - The kind of thrown exception or error.

All Known Subinterfaces:
  `ConcurrentInitializer<T>`

All Known Implementing Classes:
  `AbstractConcurrentInitializer`, `AbstractConcurrentInitializer.AbstractBuilder`, `AbstractSupplier`, `AtomicInitializer`, `AtomicInitializer.Builder`, `AtomicSafeInitializer`, `AtomicSafeInitializer.Builder`, `BackgroundInitializer`, `BackgroundInitializer.Builder`, `CallableBackgroundInitializer`, `ConstantInitializer`, `LazyInitializer`, `LazyInitializer.Builder`, `LockingVisitors.LockVisitor.LVBuilder`, `LockingVisitors.ReadWriteLockVisitor.Builder`, `LockingVisitors.ReentrantLockVisitor.Builder`, `LockingVisitors.StampedLockVisitor.Builder`, `MultiBackgroundInitializer`, `Strings.Builder`

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 FailableSupplier<T,E extends Throwable>
A functional interface like `Supplier` that declares a `Throwable`.

Since:
  3.11

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final FailableSupplier`
  `NUL`
  Returns the singleton supplier that always returns null.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `T`
  `get()`
  Supplies an object
  `static <T, E extends Exception>
  FailableSupplier<T,E>`
  `nul()`
  Gets the singleton supplier that always returns null.

- ## Field Details

  - ### NUL

    static final FailableSupplier NUL
    Returns the singleton supplier that always returns null.

    This supplier never throws an exception.

    Since:
      3.14.0

- ## Method Details

  - ### nul

    static <T, E extends Exception> FailableSupplier<T,E> nul()
    Gets the singleton supplier that always returns null.

    This supplier never throws an exception.

    Type Parameters:
      `T` - Supplied type.
      `E` - The kind of thrown exception or error.
    Returns:
      The NUL singleton.
    Since:
      3.14.0

  - ### get

    T get() throws E
    Supplies an object
    Returns:
      a result
    Throws:
      `E` - if the supplier fails