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

java.lang.Object
ovh.paulem.arcana.registry.AbstractRegistry<T,K>
ovh.paulem.arcana.registry.WriteableRegistry<T,K>
Type Parameters:
T - the type
All Implemented Interfaces:
Registry<T,K>
Direct Known Subclasses:
NewFrozenRegistry

public class WriteableRegistry<T extends RegistryKey<K>,K> extends AbstractRegistry<T,K>
An Updatable registry that can have contents added arbitrarily.
Since:
1.0.0-SNAPSHOT
  • Constructor Details

    • WriteableRegistry

      public WriteableRegistry(Supplier<Map<K,T>> registrySupplier)
    • WriteableRegistry

      public WriteableRegistry()
  • Method Details

    • register

      public boolean register(@NotNull T object)
      Registers an object within the registry
      Parameters:
      object - the object to register
      Returns:
      true if the value was successfully registered, otherwise false.
      Since:
      1.0.0-SNAPSHOT