@FunctionalInterface public interface Provider<T> extends Supplier<T>, Callable<T>
| 限定符和类型 | 方法和说明 |
|---|---|
default Provider<T> |
asLoader() |
default Provider<T> |
asSingle() |
default Provider<T> |
asThread() |
T |
call()
Computes a result, or throws an exception if unable to do so.
|
default T |
get() |
static <T> Provider<T> |
of(Callable<T> callable) |
static <T> Provider<T> |
of(Supplier<T> supplier) |
static <T> Provider<T> |
of(T instance) |
static <V,T extends V> |
of2(Callable<T> callable) |
static <V,T extends V> |
of2(Supplier<T> supplier) |
static <V,T extends V> |
of2(T instance) |
Copyright © 2021–2022. All rights reserved.