Class AbstractRegistry<T extends IRegistryType>

java.lang.Object
net.minheur.potoflux.registry.AbstractRegistry<T>
Type Parameters:
T - what registry item that the reg lists
Direct Known Subclasses:
CloseRunRegistry, CommandRegistry, MenuRegistry, ModEventsRegistry, NotificationTypesRegistry, SettingRegistry, StartLogicRunRegistry, StartUiRunRegistry, StylesheetsRegistry, TabRegistry

public abstract class AbstractRegistry<T extends IRegistryType> extends Object
A registry for an event. There should only be one by event.
The mods should create a RegistryList then use its register method, giving the class implementing this.
  • Field Details

  • Constructor Details

    • AbstractRegistry

      public AbstractRegistry()
  • Method Details

    • getAll

      @Contract(pure=true) @NotNull public @NotNull Collection<T> getAll()
      Getter for all value
      Returns:
      REGISTRY's values
    • add

      public T add(@NotNull T item)
      Adds an item to the reg
      Parameters:
      item - object to add to the reg
      Returns:
      the item added
    • close

      public void close()