Interface Try.CheckedSupplier<T>

Type Parameters:
T - the type of result supplied by this supplier
Enclosing interface:
Try<Value>
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 static interface Try.CheckedSupplier<T>
A functional interface representing a supplier that can produce a value and may throw a checked exception. This is a variation of the standard Supplier interface, intended for use in scenarios where the operation may involve checked exceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Retrieves and returns a value, potentially throwing a checked exception during execution.
  • Method Details

    • get

      T get() throws Exception
      Retrieves and returns a value, potentially throwing a checked exception during execution.
      Returns:
      the value retrieved by this method
      Throws:
      Exception - if an error occurs during the retrieval