|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
com.taco.data.AbstractNoReturnMap
com.taco.data.WrappedKeyValueMap
com.taco.data.WrappedObservableMap
public class WrappedObservableMap
A map that wraps keys and values and is also observable.
Nested Class Summary | |
---|---|
protected static class |
WrappedObservableMap.WrappedNotificationStrategy
A notification strategy that wraps another one, used so that when the observable map notifies its listeners, the keys and values it sends to the listeners are suitably unwrapped (they are stored wrapped in the observable map). |
protected class |
WrappedObservableMap.WrappedObservableEntry
Represents a map entry in the entry set. |
protected class |
WrappedObservableMap.WrappedObservableEntryIterator
|
protected class |
WrappedObservableMap.WrappedObservableEntrySet
A class that acts as the entry set of a WrappedObservableMap . |
Nested classes/interfaces inherited from class com.taco.data.WrappedKeyValueMap |
---|
WrappedKeyValueMap.WrappedEntry, WrappedKeyValueMap.WrappedEntryIterator, WrappedKeyValueMap.WrappedEntrySet |
Nested classes/interfaces inherited from class com.taco.data.AbstractNoReturnMap |
---|
AbstractNoReturnMap.NoReturnEntry, AbstractNoReturnMap.NoReturnEntrySet, AbstractNoReturnMap.NoReturnIterator |
Nested classes/interfaces inherited from interface com.taco.data.INoReturnObservableMap |
---|
INoReturnObservableMap.INoReturnObservableEntry |
Nested classes/interfaces inherited from interface com.taco.data.INoReturnMap |
---|
INoReturnMap.INoReturnEntry |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry |
Nested classes/interfaces inherited from interface com.taco.data.IObservableMap |
---|
IObservableMap.IObservableEntry |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry |
Field Summary | |
---|---|
protected INoReturnObservableMap |
_observableMap
The observable map this instance decorates. |
Fields inherited from class com.taco.data.WrappedKeyValueMap |
---|
_cachedEntrySet, _innerMap, _keyUnwrapper, _keyWrapper, _noReturnMap, _valueUnwrapper, _valueWrapper |
Fields inherited from class com.taco.data.AbstractNoReturnMap |
---|
_cachedNoReturnEntrySet |
Fields inherited from interface com.taco.data.IObservableMap |
---|
SINGLE_THREADED_STRATEGY |
Constructor Summary | |
---|---|
WrappedObservableMap(IMapFactory mapFactory,
int capacity,
INotificationStrategy notificationStrategy,
IObjectMapper keyWrapper,
IObjectMapper keyUnwrapper,
IObjectMapper valueWrapper,
IObjectMapper valueUnwrapper)
|
|
WrappedObservableMap(INotificationStrategy notificationStrategy,
IObjectMapper keyWrapper,
IObjectMapper keyUnwrapper,
IObjectMapper valueWrapper,
IObjectMapper valueUnwrapper)
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.lang.String key,
java.beans.PropertyChangeListener listener)
Add listener to the list of listeners to notify when the
value associated with key is changed. |
java.lang.Object |
clone()
|
java.util.Set |
entrySet()
|
INotificationStrategy |
getNotificationStrategy()
Return the unwrapped notification strategy (the same as was passed to the constructor). |
java.util.Collection |
getPropertyChangeListeners(java.lang.String key)
Return a copy of the collection of listeners of changes to values associated with the argument key. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Put the key-value pair in the map. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value,
boolean notifyListeners)
Put the key-value pair in the map. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value,
IObjectFilter listenerFilter)
Put the key-value pair in the map. |
void |
putAll(java.util.Map source)
Add mappings of source to this instance using
putNoReturn() . |
void |
putAll(java.util.Map source,
boolean notifyListeners)
Copy all of the mappings from the specified map to this map. |
void |
putAll(java.util.Map source,
IObjectFilter listenerFilter)
Copy all of the mappings from the specified map to this map. |
void |
putNoReturn(java.lang.Object key,
java.lang.Object value)
This implementation simply calls put() -- there is
no speed advantage to using this method. |
void |
putNoReturn(java.lang.Object key,
java.lang.Object value,
boolean notifyListeners)
Associate value with key . |
void |
putNoReturn(java.lang.Object key,
java.lang.Object value,
IObjectFilter listenerFilter)
|
void |
removePropertyChangeListener(java.lang.String key,
java.beans.PropertyChangeListener listener)
Remove listener from the list of listeners to notify when
the value associated with key is changed. |
void |
setNotificationStrategy(INotificationStrategy strategy)
Wrap the argument strategy so that listeners are notified with the unwrapped keys and values. |
void |
setPropertyChangeListeners(java.lang.String key,
java.util.Collection listeners)
Set the collection of listeners to be notified when the value associated with key is changed. |
Methods inherited from class com.taco.data.WrappedKeyValueMap |
---|
clear, entrySetNoReturn, get, isEmpty, remove, removeNoReturn, size |
Methods inherited from class java.util.AbstractMap |
---|
containsKey, containsValue, equals, hashCode, keySet, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.taco.data.INoReturnMap |
---|
entrySetNoReturn, removeNoReturn |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, remove, size, values |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, remove, size, values |
Field Detail |
---|
protected INoReturnObservableMap _observableMap
Constructor Detail |
---|
public WrappedObservableMap(INotificationStrategy notificationStrategy, IObjectMapper keyWrapper, IObjectMapper keyUnwrapper, IObjectMapper valueWrapper, IObjectMapper valueUnwrapper)
public WrappedObservableMap(IMapFactory mapFactory, int capacity, INotificationStrategy notificationStrategy, IObjectMapper keyWrapper, IObjectMapper keyUnwrapper, IObjectMapper valueWrapper, IObjectMapper valueUnwrapper)
Method Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class WrappedKeyValueMap
java.lang.CloneNotSupportedException
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
IObservableMap
put(key, value,
true)
.
put
in interface IObservableMap
put
in interface java.util.Map
put
in class WrappedKeyValueMap
public java.lang.Object put(java.lang.Object key, java.lang.Object value, boolean notifyListeners)
IObservableMap
notifyListeners
is
true
, notify all listeners for argument key of the change.
put
in interface IObservableMap
public java.lang.Object put(java.lang.Object key, java.lang.Object value, IObjectFilter listenerFilter)
IObservableMap
put
in interface IObservableMap
public void putNoReturn(java.lang.Object key, java.lang.Object value)
AbstractNoReturnMap
put()
-- there is
no speed advantage to using this method.
putNoReturn
in interface INoReturnMap
putNoReturn
in class WrappedKeyValueMap
public void putNoReturn(java.lang.Object key, java.lang.Object value, boolean notifyListeners)
INoReturnObservableMap
value
with key
. If
notifyListeners
is true, notify all listeners of the
key
property.
putNoReturn
in interface INoReturnObservableMap
public void putNoReturn(java.lang.Object key, java.lang.Object value, IObjectFilter listenerFilter)
putNoReturn
in interface INoReturnObservableMap
public void putAll(java.util.Map source)
AbstractNoReturnMap
mappings
of source to this instance using
putNoReturn()
.
putAll
in interface INoReturnMap
putAll
in interface IObservableMap
putAll
in interface java.util.Map
putAll
in class AbstractNoReturnMap
public void putAll(java.util.Map source, boolean notifyListeners)
IObservableMap
notifyListeners
is true
, notify all listeners
of the affected keys of the changes.
putAll
in interface IObservableMap
public void putAll(java.util.Map source, IObjectFilter listenerFilter)
IObservableMap
notifyListeners
is true
, notify all listeners
of the affected keys that are accepted by the filter of the changes.
putAll
in interface IObservableMap
public java.util.Set entrySet()
entrySet
in interface java.util.Map
entrySet
in class WrappedKeyValueMap
public void addPropertyChangeListener(java.lang.String key, java.beans.PropertyChangeListener listener)
IObservableMap
listener
to the list of listeners to notify when the
value associated with key
is changed.
addPropertyChangeListener
in interface IObservableMap
public void removePropertyChangeListener(java.lang.String key, java.beans.PropertyChangeListener listener)
IObservableMap
listener
from the list of listeners to notify when
the value associated with key
is changed. If
listener
is not on the list, fail silently.
removePropertyChangeListener
in interface IObservableMap
public java.util.Collection getPropertyChangeListeners(java.lang.String key)
IObservableMap
getPropertyChangeListeners
in interface IObservableMap
public void setPropertyChangeListeners(java.lang.String key, java.util.Collection listeners)
IObservableMap
key
is changed. If listeners
is null
, do not notify any listener. A copy of the
argument collection is made so the user is free to modify it
afterwards.
setPropertyChangeListeners
in interface IObservableMap
public INotificationStrategy getNotificationStrategy()
getNotificationStrategy
in interface IObservableMap
public void setNotificationStrategy(INotificationStrategy strategy)
setNotificationStrategy
in interface IObservableMap
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |