public class SupplierUtil extends java.lang.Object
Helper methods for dealing with java.util.function.Supplier.
Type Params | Return Type | Name and description |
---|---|---|
|
public T |
get() |
|
public T |
get() |
<T> |
public static java.util.function.Supplier<T> |
memoized(java.util.function.Supplier<T> actual) Caches the result of supplier in a thread safe manner. |
<T> |
public static java.util.function.Supplier<T> |
memoizedNonEmpty(java.util.function.Supplier<T> actual) Caches the result of supplier in a thread safe manner. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Caches the result of supplier in a thread safe manner.
actual
- The supplier providing the resultT
- The type of resultCaches the result of supplier in a thread safe manner. The result is only cached if it is non null or non empty if an optional.
actual
- The supplier providing the resultT
- The type of result