Package org.geysermc.geyser.registry
Class SimpleRegistry<M>
java.lang.Object
org.geysermc.geyser.registry.Registry<M>
org.geysermc.geyser.registry.SimpleRegistry<M>
- Type Parameters:
M
- the value being held by the registry
A simple registry with no defined mapping or input type. Designed to allow
for simple registrations of any given type without restrictions on what
the input or output can be.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <I, M> SimpleRegistry<M>
create(I input, Supplier<RegistryLoader<I,M>> registryLoader)
Creates a new registry with the givenRegistryLoader
supplier and input.static <I, M> SimpleRegistry<M>
create(I input, RegistryLoader<I,M> registryLoader)
Creates a new registry with the givenRegistryLoader
and input.static <I, M> SimpleRegistry<M>
create(Supplier<RegistryLoader<I,M>> registryLoader)
Creates a new registry with the givenRegistryLoader
supplier.static <I, M> SimpleRegistry<M>
create(RegistryLoader<I,M> registryLoader)
Creates a new registry with the givenRegistryLoader
.
-
Method Details
-
create
Creates a new registry with the givenRegistryLoader
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.- Type Parameters:
I
- the input typeM
- the returned mappings type- Parameters:
registryLoader
- the registry loader supplier- Returns:
- a new registry with the given RegistryLoader supplier
-
create
public static <I, M> SimpleRegistry<M> create(I input, Supplier<RegistryLoader<I,M>> registryLoader)Creates a new registry with the givenRegistryLoader
supplier and input.- Type Parameters:
I
- the input typeM
- the returned mappings type- Parameters:
input
- the inputregistryLoader
- the registry loader supplier- Returns:
- a new registry with the given RegistryLoader supplier
-
create
Creates a new registry with the givenRegistryLoader
. The input type is not specified here, meaning the loader return type is either predefined, or the registry is populated at a later point.- Type Parameters:
I
- the input typeM
- the returned mappings type- Parameters:
registryLoader
- the registry loader- Returns:
- a new registry with the given RegistryLoader supplier
-
create
Creates a new registry with the givenRegistryLoader
and input.- Type Parameters:
I
- the input typeM
- the returned mappings type- Parameters:
input
- the inputregistryLoader
- the registry loader- Returns:
- a new registry with the given RegistryLoader supplier
-