@Test public void testSuppliersGetIsNotCalledOnInitialization() { LazyCachingSupplier.lazyCaching(() -> { fail("Should never be called"); return "never"; }); }
public static <T> LazyCachingSupplier<T> lazyCaching(Supplier<T> supplier) { return new LazyCachingSupplier<>(supplier); }
LazyCachingSupplier implements Supplier<T> { public static <T> LazyCachingSupplier<T> lazyCaching(Supplier<T> supplier) { return new LazyCachingSupplier<>(supplier); } }
LazyCachingSupplier implements Supplier<T> { public static <T> LazyCachingSupplier<T> lazyCaching(Supplier<T> supplier) { return new LazyCachingSupplier<>(supplier); } private  LazyCachingSupplier(Supplier<T> supplier); }
LazyCachingSupplier implements Supplier<T> { public static <T> LazyCachingSupplier<T> lazyCaching(Supplier<T> supplier) { return new LazyCachingSupplier<>(supplier); } private  LazyCachingSupplier(Supplier<T> supplier); @Override T get(); static LazyCachingSupplier<T> lazyCaching(Supplier<T> supplier); }
LazyCachingSupplier implements Supplier<T> { public static <T> LazyCachingSupplier<T> lazyCaching(Supplier<T> supplier) { return new LazyCachingSupplier<>(supplier); } private  LazyCachingSupplier(Supplier<T> supplier); @Override T get(); static LazyCachingSupplier<T> lazyCaching(Supplier<T> supplier);  }