public class WrappedInputTriggerMap extends InputTriggerMap
InputTriggerMap
that can have its own parent.
The wrapped InputTriggerMap
should not have a parent!?Constructor and Description |
---|
WrappedInputTriggerMap(InputTriggerMap inputTriggerMap) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all bindings from this map.
|
Set<String> |
get(InputTrigger inputTrigger)
Get the set of all bindings for
inputTrigger defined in this map
and its parents. |
Map<InputTrigger,Set<String>> |
getAllBindings()
Get all bindings defined in this map and its parents.
|
InputTriggerMap |
getParent()
Gets this
InputTriggerMap 's parent. |
int |
modCount() |
void |
put(InputTrigger inputTrigger,
String behaviourKey)
Adds a binding for
inputTrigger to behaviourKey . |
void |
remove(InputTrigger inputTrigger,
String behaviourKey)
Remove the specific binding from
inputTrigger to behaviourKey from this map. |
void |
removeAll(InputTrigger inputTrigger)
Remove all bindings for
inputTrigger from this map. |
void |
setParent(InputTriggerMap map)
Sets this
InputTriggerMap 's parent. |
getBindings
public WrappedInputTriggerMap(InputTriggerMap inputTriggerMap)
public void setParent(InputTriggerMap map)
InputTriggerMap
InputTriggerMap
's parent.setParent
in class InputTriggerMap
map
- the map that is the parent of this onepublic InputTriggerMap getParent()
InputTriggerMap
InputTriggerMap
's parent.getParent
in class InputTriggerMap
null
if
this map has no parentpublic void put(InputTrigger inputTrigger, String behaviourKey)
InputTriggerMap
inputTrigger
to behaviourKey
.put
in class InputTriggerMap
public Set<String> get(InputTrigger inputTrigger)
InputTriggerMap
inputTrigger
defined in this map
and its parents.get
in class InputTriggerMap
inputTrigger
.public void remove(InputTrigger inputTrigger, String behaviourKey)
InputTriggerMap
inputTrigger
to behaviourKey
from this map.remove
in class InputTriggerMap
public void removeAll(InputTrigger inputTrigger)
InputTriggerMap
inputTrigger
from this map.removeAll
in class InputTriggerMap
public void clear()
InputTriggerMap
clear
in class InputTriggerMap
public Map<InputTrigger,Set<String>> getAllBindings()
InputTriggerMap
InputTriggerMap
, i.e.,
it will not reflect changes to the InputTriggerMap
.
This differs from getBindings()
in that this method includes the
bindings defined in the parent.
getAllBindings
in class InputTriggerMap
public int modCount()
modCount
in class InputTriggerMap
Copyright © 2015–2022 SciJava. All rights reserved.