public abstract class LocklessLazyVar<T>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
LocklessLazyVar.LazyVarInit<Q> |
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.Object |
NULL |
| Constructor and Description |
|---|
LocklessLazyVar() |
| Modifier and Type | Method and Description |
|---|---|
T |
clear()
Clears the variable, forcing the next call to
get() to re-init the value. |
T |
get() |
protected abstract T |
init() |
boolean |
isLoaded() |
static <Q> LocklessLazyVar<Q> |
make(LocklessLazyVar.LazyVarInit<Q> closure)
Creates a new LockingLazyVar based on the type of the LazyVarInit passed in.
|
T |
set(T value) |
public T get()
protected abstract T init()
public final T clear()
get() to re-init the value.public boolean isLoaded()
public static <Q> LocklessLazyVar<Q> make(LocklessLazyVar.LazyVarInit<Q> closure)
Copyright © 2021. All rights reserved.