Package com.epam.reportportal.utils
Class MemoizingSupplier<T>
- java.lang.Object
-
- com.epam.reportportal.utils.MemoizingSupplier<T>
-
- Type Parameters:
T- the supplier type
- All Implemented Interfaces:
java.io.Serializable,java.util.function.Supplier<T>
public class MemoizingSupplier<T> extends java.lang.Object implements java.util.function.Supplier<T>, java.io.SerializableReturns a supplier which caches the instance retrieved during the first call to get() and returns that value on subsequent calls to get().- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MemoizingSupplier(java.util.function.Supplier<T> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tget()booleanisInitialized()voidreset()java.lang.StringtoString()
-
-
-
Constructor Detail
-
MemoizingSupplier
public MemoizingSupplier(@Nonnull java.util.function.Supplier<T> delegate)
-
-