Interface CheckedRunnable<E extends Exception>

Type Parameters:
E - the type of exception that can be thrown by the run() method
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 CheckedRunnable<E extends Exception>
Represents a functional interface similar to Runnable but allows for checked exceptions to be thrown.

This functional interface is intended for use in scenarios where a task needs to be executed and exceptions that must be explicitly declared in a method's throws clause must be handled.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run()
     
  • Method Details