Class MappedRegistry<K,V,M extends Map<K,V>>

Type Parameters:
K - the key
V - the value
M - the map

public class MappedRegistry<K,V,M extends Map<K,V>> extends AbstractMappedRegistry<K,V,M>
An public registry holding a map of various registrations as defined by MappedRegistry. The M represents the map class, which can be anything that extends Map. The MappedRegistry and MappedRegistry generics are the key and value respectively.
  • Constructor Details

    • MappedRegistry

      protected MappedRegistry(I input, RegistryLoader<I,M> registryLoader)
  • Method Details

    • create

      public static <I, K, V, M extends Map<K, V>> MappedRegistry<K,V,M> create(RegistryLoader<I,M> registryLoader)
      Creates a new mapped registry with the given 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.
      Type Parameters:
      I - the input
      K - the map key
      V - the map value
      M - the returned mappings type, a map in this case
      Parameters:
      registryLoader - the registry loader
      Returns:
      a new registry with the given RegistryLoader
    • create

      public static <I, K, V, M extends Map<K, V>> MappedRegistry<K,V,M> create(I input, RegistryLoader<I,M> registryLoader)
      Creates a new mapped registry with the given RegistryLoader and input.
      Type Parameters:
      I - the input
      K - the map key
      V - the map value
      M - the returned mappings type, a map in this case
      Parameters:
      input - the input
      registryLoader - the registry loader
      Returns:
      a new registry with the given RegistryLoader
    • create

      public static <I, K, V, M extends Map<K, V>> MappedRegistry<K,V,M> create(Supplier<RegistryLoader<I,M>> registryLoader)
      Creates a new mapped registry with the given 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.
      Type Parameters:
      I - the input
      K - the map key
      V - the map value
      M - the returned mappings type, a map in this case
      Parameters:
      registryLoader - the registry loader supplier
      Returns:
      a new registry with the given RegistryLoader supplier
    • create

      public static <I, K, V, M extends Map<K, V>> MappedRegistry<K,V,M> create(I input, Supplier<RegistryLoader<I,M>> registryLoader)
      Creates a new mapped registry with the given RegistryLoader and input.
      Type Parameters:
      I - the input
      K - the map key
      V - the map value
      M - the returned mappings type, a map in this case
      Parameters:
      registryLoader - the registry loader
      Returns:
      a new registry with the given RegistryLoader supplier