Package com.simsilica.lemur.core
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>>>
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommands
(K key, Command<? super S> command) void
addCommands
(K key, Command<? super S>... commands) void
addCommands
(K key, Collection<Command<? super S>> commands) void
runCommands
(K key) Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
CommandMap
-
-
Method Details
-
runCommands
-
addCommands
-
addCommands
-
addCommands
-
get
-