public abstract class LocklessLazyVar<T> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
LocklessLazyVar.LazyVarInit<Q> |
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) |
protected static final Object NULL
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 © 2024. All rights reserved.