public class RegistryValue<T>
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
RegistryValue(java.lang.String key) |
protected |
RegistryValue(java.lang.String key,
T value) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static <T> java.util.Optional<RegistryValue<T>> |
get(java.lang.Class<T> type,
java.lang.String key) |
java.lang.String |
getKey() |
java.util.Optional<T> |
getValue() |
T |
getValueUnsafe() |
int |
hashCode() |
void |
ifInitialized(java.util.function.Consumer<T> consumer) |
RegistryValue<T> |
invalidate() |
boolean |
isInitialized() |
<U> java.util.Optional<U> |
map(java.util.function.Function<? super T,? extends U> mapper) |
static <T> RegistryValue<T> |
of(java.lang.Class<T> type,
java.lang.String key) |
static <T> RegistryValue<T> |
of(java.lang.Class<T> type,
java.lang.String key,
T value) |
T |
orElse(RegistryValue<T> other) |
T |
orElse(T other) |
protected RegistryValue<T> |
setValue(T value) |
protected RegistryValue(java.lang.String key)
protected RegistryValue(java.lang.String key, T value)
public static <T> RegistryValue<T> of(java.lang.Class<T> type, java.lang.String key)
public static <T> RegistryValue<T> of(java.lang.Class<T> type, java.lang.String key, T value)
public static <T> java.util.Optional<RegistryValue<T>> get(java.lang.Class<T> type, java.lang.String key)
protected RegistryValue<T> setValue(T value)
public RegistryValue<T> invalidate()
public java.lang.String getKey()
public boolean isInitialized()
public void ifInitialized(java.util.function.Consumer<T> consumer)
public java.util.Optional<T> getValue()
public T getValueUnsafe()
public T orElse(RegistryValue<T> other)
public <U> java.util.Optional<U> map(java.util.function.Function<? super T,? extends U> mapper)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object