Class FrozenRegistry<T extends RegistryKey<K>,K>

java.lang.Object
net.paulem.arcana.registry.AbstractRegistry<T,K>
net.paulem.arcana.registry.FrozenRegistry<T,K>
Type Parameters:
T - the type of the object
All Implemented Interfaces:
Registry<T,K>

public class FrozenRegistry<T extends RegistryKey<K>,K> extends AbstractRegistry<T,K>
Represents a registry that can not be registered too after creation
Since:
1.0.0-SNAPSHOT
  • Constructor Details

    • FrozenRegistry

      public FrozenRegistry(Supplier<Map<K,T>> registrySupplier)
      Creates a new frozen registry, copying the entries from the map produced by the given supplier so it can never be modified after creation.
      Parameters:
      registrySupplier - supplies the map whose entries are copied into this registry