public class WrappedBehaviourMap extends BehaviourMap
BehaviourMap
that can have its own parent.
The wrapped BehaviourMap
should not have a parent!?Constructor and Description |
---|
WrappedBehaviourMap(BehaviourMap behaviourMap) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all bindings from this map..
|
Behaviour |
get(String key)
Returns the binding for
key , messaging the parent
BehaviourMap if the binding is not locally defined. |
Map<String,Behaviour> |
getAllBindings()
Get all bindings defined in this map and its parents.
|
BehaviourMap |
getParent()
Gets this
BehaviourMap 's parent. |
int |
modCount() |
void |
put(String key,
Behaviour behaviour)
Adds a binding for
key to behaviour . |
void |
remove(String key)
Removes the binding for
key from this map. |
void |
setParent(BehaviourMap map)
Sets this
BehaviourMap 's parent. |
keys
public WrappedBehaviourMap(BehaviourMap behaviourMap)
public void setParent(BehaviourMap map)
BehaviourMap
BehaviourMap
's parent.setParent
in class BehaviourMap
map
- the map that is the parent of this onepublic BehaviourMap getParent()
BehaviourMap
BehaviourMap
's parent.getParent
in class BehaviourMap
null
if
this map has no parentpublic void put(String key, Behaviour behaviour)
BehaviourMap
key
to behaviour
. If behaviour
is null
, this removes the current binding for key
.put
in class BehaviourMap
public Behaviour get(String key)
BehaviourMap
key
, messaging the parent
BehaviourMap
if the binding is not locally defined.get
in class BehaviourMap
public void remove(String key)
BehaviourMap
key
from this map.remove
in class BehaviourMap
public void clear()
BehaviourMap
clear
in class BehaviourMap
public Map<String,Behaviour> getAllBindings()
BehaviourMap
BehaviourMap
, i.e., it will not
reflect changes to the BehaviourMap
.getAllBindings
in class BehaviourMap
public int modCount()
modCount
in class BehaviourMap
Copyright © 2015–2022 SciJava. All rights reserved.