Class NamespacedHierarchicalStore.MemoizingSupplier
- java.lang.Object
-
- org.junit.platform.engine.support.store.NamespacedHierarchicalStore.MemoizingSupplier
-
- All Implemented Interfaces:
java.util.function.Supplier<java.lang.Object>
- Enclosing class:
- NamespacedHierarchicalStore<N>
private static class NamespacedHierarchicalStore.MemoizingSupplier extends java.lang.Object implements java.util.function.Supplier<java.lang.Object>Thread-safeSupplierthat memoizes the result of calling its delegate and ensures it is called at most once.If the delegate throws an exception, it is stored and rethrown every time
get()is called.- See Also:
NamespacedHierarchicalStore.StoredValue
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classNamespacedHierarchicalStore.MemoizingSupplier.Failure
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Supplier<java.lang.Object>delegateprivate static java.lang.ObjectNO_VALUE_SETprivate java.lang.Objectvalue
-
Constructor Summary
Constructors Modifier Constructor Description privateMemoizingSupplier(java.util.function.Supplier<java.lang.Object> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcomputeValue()java.lang.Objectget()
-