T - The supplier result type.public final class MemoizedSupplier<T> extends Object implements Supplier<T>
Supplier
which gets a value by invoking its initializer once
and then keeps returning the same value as its supplied results.
This class is thread safe.public static <T> MemoizedSupplier<T> valueOf(Supplier<T> supplier)
supplier - to supply at most one non-null value.MemoizedSupplier with the given supplier.public boolean isInitialized()
Copyright © 2017–2023 The Apache Software Foundation. All rights reserved.