public final class DeferUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Object |
asToStringObject(Supplier<String> supplier)
Returns an
Object instance that realize the specified supplier only when calling Object#toString(). |
static <S> Provider<List<S>> |
executes(Runnable delegate)
|
public static Object asToStringObject(Supplier<String> supplier)
Object instance that realize the specified supplier only when calling Object#toString().supplier - a supplier of String to realize during Object#toString()Object instance realizing the specified supplier when calling Object#toString(), never null.public static <S> Provider<List<S>> executes(Runnable delegate)
Provider instance that runs the specified Runnable when resolved.
The provider always run the Runnable and return an empty list.S - the element type of returned listdelegate - a runnable to run upon resolving the provider.