public class CommandRegistryImpl<C extends Command> extends Object implements CommandRegistry<C>
| Constructor and Description |
|---|
CommandRegistryImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the registry.
|
boolean |
contains(C item) |
List<C> |
getCommandHistory()
Returns the registered commands, can be composite commands as well.
|
boolean |
isEmpty() |
C |
peek()
Peek the command from the registry.
|
C |
pop()
Peek and remove the command from the registry.
|
void |
register(C command)
Registers a single or more than one command/s.
|
boolean |
remove(C command) |
void |
setMaxSize(int size) |
public void setMaxSize(int size)
setMaxSize in interface SizeConstrainedRegistrypublic void register(C command)
CommandRegistryregister in interface CommandRegistry<C extends Command>register in interface DynamicRegistry<C extends Command>public boolean remove(C command)
remove in interface DynamicRegistry<C extends Command>public void clear()
CommandRegistryclear in interface CommandRegistry<C extends Command>public boolean contains(C item)
public List<C> getCommandHistory()
CommandRegistrygetCommandHistory in interface CommandRegistry<C extends Command>public C peek()
CommandRegistrypeek in interface CommandRegistry<C extends Command>public C pop()
CommandRegistrypop in interface CommandRegistry<C extends Command>Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.