Package net.minheur.potoflux.terminal
Class CommandRegistry
java.lang.Object
net.minheur.potoflux.registry.AbstractRegistry<Command>
net.minheur.potoflux.terminal.CommandRegistry
Reg containing all commands of the app.
Commands should be added to this
Commands should be added to this
-
Field Summary
Fields inherited from class net.minheur.potoflux.registry.AbstractRegistry
closed, REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String pKey) Checks if a key is already used by another commandgetCommandWithKey(String pKey) Gets a command object from his keyMethods inherited from class net.minheur.potoflux.registry.AbstractRegistry
add, close, getAll
-
Constructor Details
-
CommandRegistry
public CommandRegistry()
-
-
Method Details
-
containsKey
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
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
-