public class BaseExtendedRegistry extends BaseRegistry
| Modifier and Type | Field and Description |
|---|---|
protected ConfigurationService |
configurationService |
| Constructor and Description |
|---|
BaseExtendedRegistry() |
| Modifier and Type | Method and Description |
|---|---|
<T> java.util.Optional<T> |
get(Key<T> key)
Gets this registry's value for the provided
Key
or Optional.empty() if it is not present. |
<T> T |
getDefault(Key<T> key)
Gets this registry's default value for the provided
Key
or the fallback value if it is not present. |
void |
load()
Runs all
listeners that were
added before this call. |
java.lang.String |
toString() |
addToCollection, getUnsafe, putInMap, remove, removeFromCollection, removeFromMap, set, setDefault, transform, transform, whenLoadedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetOrDefault@Inject protected ConfigurationService configurationService
public <T> java.util.Optional<T> get(Key<T> key)
RegistryKey
or Optional.empty() if it is not present.public <T> T getDefault(Key<T> key)
RegistryKey
or the fallback value if it is not present.getDefault in interface RegistrygetDefault in class BaseRegistryT - The value type of the provided Keykey - The Key to get the default value forKey or the fallback valuepublic void load()
Registrylisteners that were
added before this call.load in interface Registryload in class BaseRegistryEnvironment.reload(),
Registry.whenLoaded(Runnable)public java.lang.String toString()
toString in class BaseRegistry