Class Registry<T extends Keyed>

java.lang.Object
net.pl3x.map.core.registry.Registry<T>
All Implemented Interfaces:
Iterable<T>
Direct Known Subclasses:
BiomeRegistry, BlockRegistry, HeightmapRegistry, IconRegistry, PlayerRegistry, RendererRegistry, WorldRegistry

@NullMarked public class Registry<T extends Keyed> extends Object implements Iterable<T>
  • Field Details

  • Constructor Details

    • Registry

      public Registry()
  • Method Details

    • register

      public T register(T value)
    • register

      public T register(String id, T value)
    • unregister

      public @Nullable T unregister(String id)
    • unregister

      public void unregister()
      Unregister all entries.
    • has

      public boolean has(String key)
    • get

      public @Nullable T get(String id)
    • getOrDefault

      public T getOrDefault(String id, T def)
    • entrySet

      public Set<Map.Entry<String,T>> entrySet()
    • values

      public Collection<T> values()
    • size

      public int size()
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T extends Keyed>