Class Singleton<R>
- java.lang.Object
-
- com.ulisesbocchio.jasyptspringboot.util.Singleton<R>
-
- All Implemented Interfaces:
Supplier<R>
public final class Singleton<R> extends Object implements Supplier<R>
Singleton initializer class that uses an internal supplier to supply the singleton instance. The supplier originally checks whether the instanceSupplier has been initialized or not, but after initialization the instance supplier is changed to avoid extra logic execution.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T,U,R>
Singleton<R>from(BiFunction<T,U,R> original, T arg0, U arg1)static <T,R>
Singleton<R>from(Function<T,R> original, T arg0)static <R> Singleton<R>from(Supplier<R> original)static <T,U,R>
Singleton<R>fromLazy(BiFunction<T,U,R> original, Supplier<T> arg0Supplier, Supplier<U> arg1Supplier)static <T,R>
Singleton<R>fromLazy(Function<T,R> original, Supplier<T> arg0Supplier)Rget()
-
-
-
Method Detail
-
from
public static <T,U,R> Singleton<R> from(BiFunction<T,U,R> original, T arg0, U arg1)
-
fromLazy
public static <T,R> Singleton<R> fromLazy(Function<T,R> original, Supplier<T> arg0Supplier)
-
fromLazy
public static <T,U,R> Singleton<R> fromLazy(BiFunction<T,U,R> original, Supplier<T> arg0Supplier, Supplier<U> arg1Supplier)
-
-