- Type Parameters:
R- 返回值类型
- All Superinterfaces:
Serializable,Supplier<R>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
可序列化的Supplier接口,支持异常抛出和多Supplier组合。
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Method Summary
-
Method Details
-
last
从多个SupplierX中返回最后一个。- Type Parameters:
T- 返回值类型- Parameters:
serSups- 要组合的SupplierX实例- Returns:
- 最后一个SupplierX实例,若无则返回null Supplier
-
getting
获取结果,可能抛出异常。- Returns:
- 结果
- Throws:
Throwable- 可能抛出的异常
-
get
获取结果,自动处理异常。- Specified by:
getin interfaceSupplier<R>- Returns:
- 结果
- Throws:
RuntimeException- 包装后的运行时异常
-