Class CommandMap<S,K>

java.lang.Object
java.util.AbstractMap<K,List<Command<? super S>>>
java.util.HashMap<K,List<Command<? super S>>>
com.simsilica.lemur.core.CommandMap<S,K>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,List<Command<? super S>>>

public class CommandMap<S,K> extends HashMap<K,List<Command<? super S>>>
A general mapping of source to some list of Command objects. This can be useful for things like action maps and so forth, where some action type gets mapped to caller configured commands.
See Also:
  • Constructor Details

    • CommandMap

      public CommandMap(S source)
  • Method Details

    • runCommands

      public void runCommands(K key)
    • addCommands

      public void addCommands(K key, Command<? super S> command)
    • addCommands

      public void addCommands(K key, Command<? super S>... commands)
    • addCommands

      public void addCommands(K key, Collection<Command<? super S>> commands)
    • get

      public List<Command<? super S>> get(K key, boolean create)