K - the keyV - the valueM - the mappublic abstract class AbstractMappedRegistry<K,V,M extends Map<K,V>> extends Registry<M>
M.
The M represents the map class, which can be anything that extends Map. The
K and V generics are the key and value respectively.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMappedRegistry(I input,
RegistryLoader<I,M> registryLoader) |
| Modifier and Type | Method and Description |
|---|---|
V |
get(K key)
Returns the value registered by the given key.
|
V |
getOrDefault(K key,
V defaultValue)
Returns the value registered by the given key or the default value
specified if null.
|
V |
register(K key,
V value)
Registers a new value into this registry with the given key.
|
protected AbstractMappedRegistry(I input,
RegistryLoader<I,M> registryLoader)
@Nullable public V get(K key)
key - the keypublic V getOrDefault(K key, V defaultValue)
key - the keydefaultValue - the default valueCopyright © 2021 GeyserMC. All rights reserved.