Class NamespacedRegistry<V extends Keyed>

java.lang.Object
com.sk89q.worldedit.registry.Registry<V>
com.sk89q.worldedit.registry.NamespacedRegistry<V>
All Implemented Interfaces:
Iterable<V>

public final class NamespacedRegistry<V extends Keyed> extends Registry<V>
  • Constructor Details

    • NamespacedRegistry

      public NamespacedRegistry(String name)
    • NamespacedRegistry

      public NamespacedRegistry(String name, boolean checkInitialized)
    • NamespacedRegistry

      public NamespacedRegistry(String name, String defaultNamespace)
    • NamespacedRegistry

      public NamespacedRegistry(String name, String defaultNamespace, boolean checkInitialized)
  • Method Details

    • get

      @Nullable public V get(String key)
      Overrides:
      get in class Registry<V extends Keyed>
    • register

      public V register(String key, V value)
      Overrides:
      register in class Registry<V extends Keyed>
    • getByInternalId

      public V getByInternalId(int index)
    • size

      public int size()
    • getKnownNamespaces

      public Set<String> getKnownNamespaces()
      Get a set of the namespaces of all registered keys.
      Returns:
      set of namespaces
    • getDefaultNamespace

      public String getDefaultNamespace()
      Get the default namespace for this registry.
      Returns:
      the default namespace
    • getSuggestions

      public <V1 extends Keyed> Stream<String> getSuggestions(String input)