- All Superinterfaces:
Runnable,Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
可序列化的Runnable接口,支持异常抛出和多个Runnable组合。
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Method Summary
-
Method Details
-
multi
组合多个RunnableX实例,按顺序执行。- Parameters:
serRunnableArray- 要组合的RunnableX实例- Returns:
- 组合后的RunnableX实例
-
running
执行Runnable操作,可能抛出异常。- Throws:
Throwable- 可能抛出的异常- See Also:
-
run
default void run()执行Runnable操作,自动处理异常。- Specified by:
runin interfaceRunnable- Throws:
RuntimeException- 包装后的运行时异常- See Also:
-