Package it.tidalwave.util
Class LazySupplier<T>
- java.lang.Object
-
- it.tidalwave.util.LazySupplier<T>
-
- All Implemented Interfaces:
java.util.function.Supplier<T>
@ThreadSafe public class LazySupplier<T> extends java.lang.Object implements java.util.function.Supplier<T>
A supplier of an object that is lazily evaluated (when its value is requested for the first time). It warranties that the real wrapped supplier is called only once.- Since:
- 3.2-ALPHA-13
- Author:
- Fabrizio Giudici
-
-
Constructor Summary
Constructors Constructor Description LazySupplier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
T
get()
void
set(T ref)
-