Package com.github.phantomthief.util
Class MoreSuppliers
- java.lang.Object
-
- com.github.phantomthief.util.MoreSuppliers
-
public final class MoreSuppliers extends Object
- Author:
- w.vela
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMoreSuppliers.AsyncSupplier<T>static classMoreSuppliers.CloseableSupplier<T>static classMoreSuppliers.CloseableThrowableSupplier<T,X extends Throwable>
-
Constructor Summary
Constructors Constructor Description MoreSuppliers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Supplier<T>asyncLazy(Supplier<T> delegate)static <T> Supplier<T>asyncLazy(Supplier<T> delegate, String threadName)static <T> Supplier<T>asyncLazy(Supplier<T> delegate, Supplier<T> pendingSupplier, String threadName)static <T> MoreSuppliers.CloseableSupplier<T>lazy(Supplier<T> delegate)static <T> MoreSuppliers.CloseableSupplier<T>lazy(Supplier<T> delegate, boolean resetAfterClose)static <T,X extends Throwable>
MoreSuppliers.CloseableThrowableSupplier<T,X>lazyEx(ThrowableSupplier<T,X> delegate)static <T,X extends Throwable>
MoreSuppliers.CloseableThrowableSupplier<T,X>lazyEx(ThrowableSupplier<T,X> delegate, boolean resetAfterClose)
-
-
-
Method Detail
-
lazy
public static <T> MoreSuppliers.CloseableSupplier<T> lazy(Supplier<T> delegate)
-
lazy
public static <T> MoreSuppliers.CloseableSupplier<T> lazy(Supplier<T> delegate, boolean resetAfterClose)
-
lazyEx
public static <T,X extends Throwable> MoreSuppliers.CloseableThrowableSupplier<T,X> lazyEx(ThrowableSupplier<T,X> delegate)
-
lazyEx
public static <T,X extends Throwable> MoreSuppliers.CloseableThrowableSupplier<T,X> lazyEx(ThrowableSupplier<T,X> delegate, boolean resetAfterClose)
-
asyncLazy
public static <T> Supplier<T> asyncLazy(Supplier<T> delegate, Supplier<T> pendingSupplier, String threadName)
-
-