Class CommandRegistry

java.lang.Object
net.minheur.potoflux.registry.AbstractRegistry<Command>
net.minheur.potoflux.terminal.CommandRegistry

public class CommandRegistry extends AbstractRegistry<Command>
Reg containing all commands of the app.
Commands should be added to this
  • Constructor Details

    • CommandRegistry

      public CommandRegistry()
  • Method Details

    • containsKey

      public boolean containsKey(String pKey)
      Checks if a key is already used by another command
      Parameters:
      pKey - command key to check if used
      Returns:
      if the key is already used
    • getCommandWithKey

      public Command getCommandWithKey(String pKey)
      Gets a command object from his key
      Parameters:
      pKey - command key to get the command from
      Returns:
      the command associated to the key, or null if the command doesn't exist