public class AsSupplier
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AsSupplier.CoercedSupplier<T> |
| Constructor and Description |
|---|
AsSupplier() |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.function.Supplier<T> |
asSupplier(java.lang.Object toCoerce)
Create a Duck typing based Supplier
|
static <T> java.util.function.Supplier<T> |
asSupplier(java.lang.Object toCoerce,
java.lang.String method)
Create a Duck typing based Supplier
That returns the result of a call to the supplied method name
|
public static <T> java.util.function.Supplier<T> asSupplier(java.lang.Object toCoerce)
toCoerce - Object to convert into a Supplier,
must have a non-void get() methodpublic static <T> java.util.function.Supplier<T> asSupplier(java.lang.Object toCoerce,
java.lang.String method)
toCoerce - Object to convert into a suppliermethod - Method to call when Supplier.get() called