public abstract class LazyValueHolder<T> extends Object implements ValueHolder<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
LazyValueHolder.Serializable<T>
LazyValueHolder that implements Serializable. |
| Constructor and Description |
|---|
LazyValueHolder() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
protected abstract T |
computeValue() |
static <T> LazyValueHolder<T> |
forSupplier(java.util.function.Supplier<T> supplier) |
T |
get() |
T |
getIfPresent() |
boolean |
isAvailable() |
public static <T> LazyValueHolder<T> forSupplier(java.util.function.Supplier<T> supplier)
public T get()
get in interface ValueHolder<T>public T getIfPresent()
getIfPresent in interface ValueHolder<T>public void clear()
public boolean isAvailable()
protected abstract T computeValue()
Copyright © 2015. All Rights Reserved.