Class NamespaceRegistry<V extends NamespaceContainer>

java.lang.Object
org.kingdoms.constants.namespace.NamespaceRegistry<V>
Type Parameters:
V - the value that the Namespace associates with.
Direct Known Subclasses:
AuditLogRegistry, KingdomMetadataRegistry, KingdomPermissionRegistry, RelationAttributeRegistry

public abstract class NamespaceRegistry<V extends NamespaceContainer> extends Object
A simple mapping that associates Namespaces with NamespaceRegistrys
  • Field Details

  • Constructor Details

    • NamespaceRegistry

      public NamespaceRegistry()
  • Method Details

    • register

      public void register(V value)
      Parameters:
      value - the value to be registered.
      Throws:
      IllegalArgumentException - if this namespace has already been registered before.
    • getRegistered

      public V getRegistered(Namespace namespace)
    • isRegisetered

      public boolean isRegisetered(Namespace namespace)
    • getRegistry

      public Map<Namespace,V> getRegistry()
      Returns:
      an unmodifiable map of the registry.