T
- return typepublic static class Finals.CachingSupplier<T> extends Object implements Supplier<T>
Supplier
implementation proxying another supplier while calculating
its return value at most one time.
Threads are synchronized upon calling the wrapped supplier.
Constructor and Description |
---|
CachingSupplier(Supplier<T> supplier)
Creates a new
CachingSupplier instance. |
Modifier and Type | Method and Description |
---|---|
T |
get() |
boolean |
isCalculated()
Determines if a cached value has been calculated already.
|
Copyright © 2025. All rights reserved.