Package io.ultreia.java4all.util
Class SingletonSupplier<O>
- java.lang.Object
-
- io.ultreia.java4all.util.SingletonSupplier<O>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSingletonSupplier(Supplier<O> supplier, boolean requireNonNull)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<O>clear()Oget()protected Oload()static <O> SingletonSupplier<O>of(Supplier<O> supplier)static <O> SingletonSupplier<O>of(Supplier<O> supplier, boolean requireNonNull)voidsetSupplier(Supplier<O> supplier)booleanwithValue()
-
-
-
Method Detail
-
of
public static <O> SingletonSupplier<O> of(Supplier<O> supplier)
-
of
public static <O> SingletonSupplier<O> of(Supplier<O> supplier, boolean requireNonNull)
-
withValue
public boolean withValue()
-
load
protected O load()
-
-