|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.share.util.NamespaceMap | +--oracle.cabo.share.util.BindableNamespaceMap
BindableNamespaceMap extends NamespaceMap to support the Bindable interface. It adds one additional method, and changes the semantics of other functions.
Objects that implement the Bindable interface will automatically
have their bindValue()
and unbindValue()
methods
called as they are added and removed from the map.
In addition, all methods that return stored values - including
Enumerations - will automatically unwrap Bindable objects by
calling through its getValue()
method.
The new function is unbindAll()
. It removes
all Bindable
objects - and, in doing so, triggers
all of their unbindValue()
methods. This method
makes it much simpler to add automatic cleanup of
namespaced properties stored in a context.
Bindable
Constructor Summary | |
BindableNamespaceMap()
Creates a BindableNamespaceMap, using a default size for the number of values per namespace. |
|
BindableNamespaceMap(int defaultSize)
Creates a BindableNamespaceMap. |
Method Summary | |
void |
clear()
Clears all values in all namespaces. |
void |
clear(java.lang.String namespace)
clears all keys from a namespace. |
java.lang.Object |
clone()
Returns a clone of the NamespaceMap. |
java.lang.Object |
get(java.lang.String namespace,
java.lang.Object key)
Returns the stored object. |
java.lang.Object |
getRawValue(java.lang.String namespace,
java.lang.Object key)
Returns the stored object, without unwrapping Bindable objects. |
java.util.Enumeration |
getValueEnumeration()
Returns an Enumeration over all the values added to the map. |
java.util.Enumeration |
getValueEnumeration(java.lang.String namespace)
Returns an Enumeration over all of the values for a particular namespace. |
void |
put(java.lang.String namespace,
java.lang.Object key,
java.lang.Object value)
Associates a value with a namespace and a key. |
java.lang.Object |
remove(java.lang.String namespace,
java.lang.Object key)
Removes a key from a namespace. |
void |
unbindAll()
Unbinds all "bindable" objects. |
Methods inherited from class oracle.cabo.share.util.NamespaceMap |
getKeysEnumeration, getNamespaceEnumeration |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BindableNamespaceMap()
public BindableNamespaceMap(int defaultSize)
defaultSize
- the default size of each per-namespace
storage.Method Detail |
public void unbindAll()
Bindable.unbindValue()
public java.lang.Object get(java.lang.String namespace, java.lang.Object key)
get
in class NamespaceMap
namespace
- the namespace to search.key
- the key to search the namespace for.Bindable.getValue()
public void put(java.lang.String namespace, java.lang.Object key, java.lang.Object value)
put
in class NamespaceMap
namespace
- namespace of the valuekey
- the key to associate the value withvalue
- the value to associate with the key.Bindable.getValue()
,
Bindable.bindValue()
,
Bindable.unbindValue()
public java.lang.Object remove(java.lang.String namespace, java.lang.Object key)
remove
in class NamespaceMap
namespace
- the namespace to search.key
- the key to search the namespace for.Bindable.unbindValue()
public java.util.Enumeration getValueEnumeration()
getValueEnumeration
in class NamespaceMap
Bindable.getValue()
public java.util.Enumeration getValueEnumeration(java.lang.String namespace)
getValueEnumeration
in class NamespaceMap
Bindable.getValue()
public void clear()
clear
in class NamespaceMap
public void clear(java.lang.String namespace)
clear
in class NamespaceMap
namespace
- the namespace to clear.public java.lang.Object clone()
clone
in class NamespaceMap
public java.lang.Object getRawValue(java.lang.String namespace, java.lang.Object key)
namespace
- the namespace to search.key
- the key to search the namespace for.Bindable.getValue()
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |