K - the keyV - the valueM - the mappublic class MappedRegistry<K,V,M extends Map<K,V>> extends AbstractMappedRegistry<K,V,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 |
MappedRegistry(I input,
RegistryLoader<I,M> registryLoader) |
| Modifier and Type | Method and Description |
|---|---|
static <I,K,V,M extends Map<K,V>> |
create(I input,
RegistryLoader<I,M> registryLoader)
Creates a new mapped registry with the given
RegistryLoader and input. |
static <I,K,V,M extends Map<K,V>> |
create(I input,
Supplier<RegistryLoader<I,M>> registryLoader)
Creates a new mapped registry with the given
RegistryLoader and input. |
static <I,K,V,M extends Map<K,V>> |
create(RegistryLoader<I,M> registryLoader)
Creates a new mapped registry with the given
RegistryLoader. |
static <I,K,V,M extends Map<K,V>> |
create(Supplier<RegistryLoader<I,M>> registryLoader)
Creates a new mapped registry with the given
RegistryLoader supplier. |
get, getOrDefault, registerprotected MappedRegistry(I input,
RegistryLoader<I,M> registryLoader)
public static <I,K,V,M extends Map<K,V>> MappedRegistry<K,V,M> create(RegistryLoader<I,M> registryLoader)
RegistryLoader. The
input type is not specified here, meaning the loader return type is either
predefined, or the registry is populated at a later point.I - the inputK - the map keyV - the map valueM - the returned mappings type, a map in this caseregistryLoader - the registry loaderpublic static <I,K,V,M extends Map<K,V>> MappedRegistry<K,V,M> create(I input, RegistryLoader<I,M> registryLoader)
RegistryLoader and input.I - the inputK - the map keyV - the map valueM - the returned mappings type, a map in this caseinput - the inputregistryLoader - the registry loaderpublic static <I,K,V,M extends Map<K,V>> MappedRegistry<K,V,M> create(Supplier<RegistryLoader<I,M>> registryLoader)
RegistryLoader supplier.
The input type is not specified here, meaning the loader return type is either
predefined, or the registry is populated at a later point.I - the inputK - the map keyV - the map valueM - the returned mappings type, a map in this caseregistryLoader - the registry loader supplierpublic static <I,K,V,M extends Map<K,V>> MappedRegistry<K,V,M> create(I input, Supplier<RegistryLoader<I,M>> registryLoader)
RegistryLoader and input.I - the inputK - the map keyV - the map valueM - the returned mappings type, a map in this caseregistryLoader - the registry loaderCopyright © 2021 GeyserMC. All rights reserved.