/** * Create a Duck typing based Supplier * That returns the result of a call to the supplied method name * * @param toCoerce Object to convert into a supplier * @param method Method to call when Supplier.get() called * @return Supplier that delegates to supplied object */ public static <T> Supplier<T> asSupplier(Object toCoerce, String method){ return AsSupplier.asSupplier(toCoerce,method); } /**
/** * Create a Duck typing based Supplier * * * * @param toCoerce Object to convert into a Supplier, * must have a non-void get() method * @return Supplier that delegates to the supplied object */ public static <T> Supplier<T> asSupplier(Object toCoerce){ return AsSupplier.asSupplier(toCoerce); }