|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dishevelled.observable.AbstractMapDecorator<K,V>
org.dishevelled.observable.AbstractObservableMap<K,V>
K - map key typeV - map value typepublic abstract class AbstractObservableMap<K,V>
Abstract implementation of an observable map
that decorates an instance of Map.
| Nested Class Summary | |
|---|---|
protected class |
AbstractObservableMap.ObservableEntrySet
Observable entrySet view decorator. |
protected class |
AbstractObservableMap.ObservableKeySet
Observable keySet view decorator. |
protected class |
AbstractObservableMap.ObservableValues
Observable values view decorator. |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
protected |
AbstractObservableMap(Map<K,V> map)
Create a new abstract observable map that decorates the specified map. |
| Method Summary | |
|---|---|
void |
addMapChangeListener(MapChangeListener<K,V> l)
Add the specified map change listener. |
void |
addVetoableMapChangeListener(VetoableMapChangeListener<K,V> l)
Add the specified vetoable map change listener. |
void |
clear()
|
Set<Map.Entry<K,V>> |
entrySet()
|
void |
fireMapChanged()
Fire a change event to all registered MapChangeListeners. |
void |
fireMapChanged(MapChangeEvent<K,V> e)
Fire the specified change event to all registered MapChangeListeners. |
void |
fireMapWillChange()
Fire a will change event to all registered VetoableMapChangeListeners. |
void |
fireMapWillChange(VetoableMapChangeEvent<K,V> e)
Fire the specified will change event to all registered VetoableMapChangeListeners. |
int |
getMapChangeListenerCount()
Return the number of MapChangeListeners registered
to this observable map. |
MapChangeListener<K,V>[] |
getMapChangeListeners()
Return an array of all MapChangeListeners, or
an empty array if none are registered. |
protected ObservableMapChangeSupport<K,V> |
getObservableMapChangeSupport()
Return the ObservableMapChangeSupport
class backing this abstract observable map. |
int |
getVetoableMapChangeListenerCount()
Return the number of VetoableMapChangeListeners
registered to this observable map. |
VetoableMapChangeListener<K,V>[] |
getVetoableMapChangeListeners()
Return an array of all VetoableMapChangeListeners,
or an empty array if none are registered. |
Set<K> |
keySet()
|
protected abstract void |
postClear()
Notify subclasses the clear method has just been
called on the wrapped map. |
protected abstract void |
postEntrySetClear()
Notify subclasses the clear method has just been
called on the entrySet view for the wrapped map with the specified parameter. |
protected abstract void |
postEntrySetIteratorRemove()
Notify subclasses the remove method has just been
called on the entrySet view iterator for the wrapped map. |
protected abstract void |
postEntrySetRemove(Object value)
Notify subclasses the remove method has just been
called on the entrySet view for the wrapped map with the specified parameter. |
protected abstract void |
postEntrySetRemoveAll(Collection<?> entrySet)
Notify subclasses the removeAll method has just been
called on the entrySet view for the wrapped map with the specified parameter. |
protected abstract void |
postEntrySetRetainAll(Collection<?> entrySet)
Notify subclasses the clear method has just been
called on the entrySet view for the wrapped map with the specified parameter. |
protected abstract void |
postKeySetClear()
Notify subclasses the clear method has just been
called on the keySet view for the wrapped map with the specified parameter. |
protected abstract void |
postKeySetIteratorRemove()
Notify subclasses the remove method has just been
called on the keySet view iterator for the wrapped map. |
protected abstract void |
postKeySetRemove(Object value)
Notify subclasses the remove method has just been
called on the keySet view for the wrapped map with the specified parameter. |
protected abstract void |
postKeySetRemoveAll(Collection<?> keySet)
Notify subclasses the removeAll method has just been
called on the keySet view for the wrapped map with the specified parameter. |
protected abstract void |
postKeySetRetainAll(Collection<?> keySet)
Notify subclasses the clear method has just been
called on the keySet view for the wrapped map with the specified parameter. |
protected abstract void |
postMapEntrySetValue(V value)
Notify subclasses the setValue method has just been
called on a map entry from the entrySet view iterator for the wrapped map. |
protected abstract void |
postPut(K key,
V value)
Notify subclasses the put method has just been
called on the wrapped map with the specified parameters. |
protected abstract void |
postPutAll(Map<? extends K,? extends V> map)
Notify subclasses the putAll method has just been
called on the wrapped map with the specified parameter. |
protected abstract void |
postRemove(Object key)
Notify subclasses the remove method has just been
called on the wrapped map with the specified parameter. |
protected abstract void |
postValuesClear()
Notify subclasses the clear method has just been
called on the values view for the wrapped map with the specified parameter. |
protected abstract void |
postValuesIteratorRemove()
Notify subclasses the remove method has just been
called on the values view iterator for the wrapped map. |
protected abstract void |
postValuesRemove(Object value)
Notify subclasses the remove method has just been
called on the values view for the wrapped map with the specified parameter. |
protected abstract void |
postValuesRemoveAll(Collection<?> values)
Notify subclasses the removeAll method has just been
called on the values view for the wrapped map with the specified parameter. |
protected abstract void |
postValuesRetainAll(Collection<?> values)
Notify subclasses the clear method has just been
called on the values view for the wrapped map with the specified parameter. |
protected abstract boolean |
preClear()
Notify subclasses the clear method is about to
be called on the wrapped map. |
protected abstract boolean |
preEntrySetClear()
Notify subclasses the clear method is about to
be called on the entrySet view for the wrapped map. |
protected abstract boolean |
preEntrySetIteratorRemove()
Notify subclasses the remove method is about to
be called on the entrySet view iterator for the wrapped map. |
protected abstract boolean |
preEntrySetRemove(Object value)
Notify subclasses the remove method is about to
be called on the entrySet view for the wrapped map. |
protected abstract boolean |
preEntrySetRemoveAll(Collection<?> entrySet)
Notify subclasses the removeAll method is about to
be called on the entrySet view for the wrapped map. |
protected abstract boolean |
preEntrySetRetainAll(Collection<?> entrySet)
Notify subclasses the retainAll method is about to
be called on the entrySet view for the wrapped map. |
protected abstract boolean |
preKeySetClear()
Notify subclasses the clear method is about to
be called on the keySet view for the wrapped map. |
protected abstract boolean |
preKeySetIteratorRemove()
Notify subclasses the remove method is about to
be called on the keySet view iterator for the wrapped map. |
protected abstract boolean |
preKeySetRemove(Object value)
Notify subclasses the remove method is about to
be called on the keySet view for the wrapped map. |
protected abstract boolean |
preKeySetRemoveAll(Collection<?> keySet)
Notify subclasses the removeAll method is about to
be called on the keySet view for the wrapped map. |
protected abstract boolean |
preKeySetRetainAll(Collection<?> keySet)
Notify subclasses the retainAll method is about to
be called on the keySet view for the wrapped map. |
protected abstract boolean |
preMapEntrySetValue(V value)
Notify subclasses the setValue method is about to
be called on a map entry from the entrySet view iterator for the wrapped map. |
protected abstract boolean |
prePut(K key,
V value)
Notify subclasses the put method is about to
be called on the wrapped map with the specified parameters. |
protected abstract boolean |
prePutAll(Map<? extends K,? extends V> map)
Notify subclasses the putAll method is about to
be called on the wrapped map with the specified parameter. |
protected abstract boolean |
preRemove(Object key)
Notify subclasses the remove method is about to
be called on the wrapped map with the specified parameter. |
protected abstract boolean |
preValuesClear()
Notify subclasses the clear method is about to
be called on the values view for the wrapped map. |
protected abstract boolean |
preValuesIteratorRemove()
Notify subclasses the remove method is about to
be called on the values view iterator for the wrapped map. |
protected abstract boolean |
preValuesRemove(Object value)
Notify subclasses the remove method is about to
be called on the values view for the wrapped map. |
protected abstract boolean |
preValuesRemoveAll(Collection<?> values)
Notify subclasses the removeAll method is about to
be called on the values view for the wrapped map. |
protected abstract boolean |
preValuesRetainAll(Collection<?> values)
Notify subclasses the retainAll method is about to
be called on the values view for the wrapped map. |
V |
put(K key,
V value)
|
void |
putAll(Map<? extends K,? extends V> map)
|
V |
remove(Object key)
|
void |
removeMapChangeListener(MapChangeListener<K,V> l)
Remove the specified map change listener. |
void |
removeVetoableMapChangeListener(VetoableMapChangeListener<K,V> l)
Remove the specified vetoable map change listener. |
Collection<V> |
values()
|
| Methods inherited from class org.dishevelled.observable.AbstractMapDecorator |
|---|
containsKey, containsValue, equals, get, getMap, hashCode, isEmpty, size |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
containsKey, containsValue, equals, get, hashCode, isEmpty, size |
| Constructor Detail |
|---|
protected AbstractObservableMap(Map<K,V> map)
map - map to decorate| Method Detail |
|---|
protected final ObservableMapChangeSupport<K,V> getObservableMapChangeSupport()
ObservableMapChangeSupport
class backing this abstract observable map.
ObservableMapChangeSupport
class backing this abstract observable mappublic final void addMapChangeListener(MapChangeListener<K,V> l)
addMapChangeListener in interface ObservableMap<K,V>l - map change listener to addpublic final void removeMapChangeListener(MapChangeListener<K,V> l)
removeMapChangeListener in interface ObservableMap<K,V>l - map change listener to removepublic final void addVetoableMapChangeListener(VetoableMapChangeListener<K,V> l)
addVetoableMapChangeListener in interface ObservableMap<K,V>l - vetoable map change listener to addpublic final void removeVetoableMapChangeListener(VetoableMapChangeListener<K,V> l)
removeVetoableMapChangeListener in interface ObservableMap<K,V>l - vetoable map change listener to removepublic final MapChangeListener<K,V>[] getMapChangeListeners()
MapChangeListeners, or
an empty array if none are registered.
getMapChangeListeners in interface ObservableMap<K,V>MapChangeListeners, or
an empty array if none are registeredpublic final int getMapChangeListenerCount()
MapChangeListeners registered
to this observable map.
getMapChangeListenerCount in interface ObservableMap<K,V>MapChangeListeners registered
to this observable mappublic final VetoableMapChangeListener<K,V>[] getVetoableMapChangeListeners()
VetoableMapChangeListeners,
or an empty array if none are registered.
getVetoableMapChangeListeners in interface ObservableMap<K,V>VetoableMapChangeListeners,
or an empty array if none are registeredpublic final int getVetoableMapChangeListenerCount()
VetoableMapChangeListeners
registered to this observable map.
getVetoableMapChangeListenerCount in interface ObservableMap<K,V>VetoableMapChangeListeners
registered to this observable map
public void fireMapWillChange()
throws MapChangeVetoException
VetoableMapChangeListeners.
MapChangeVetoException - if any of the listeners veto the change
public void fireMapWillChange(VetoableMapChangeEvent<K,V> e)
throws MapChangeVetoException
VetoableMapChangeListeners.
e - will change event
MapChangeVetoException - if any of the listeners veto the changepublic void fireMapChanged()
MapChangeListeners.
public void fireMapChanged(MapChangeEvent<K,V> e)
MapChangeListeners.
e - change eventprotected abstract boolean preClear()
clear method is about to
be called on the wrapped map.
Return true to proceed with the change.
protected abstract void postClear()
clear method has just been
called on the wrapped map.
protected abstract boolean prePut(K key,
V value)
put method is about to
be called on the wrapped map with the specified parameters.
Return true to proceed with the change.
key - put method key parametervalue - put method value parameter
protected abstract void postPut(K key,
V value)
put method has just been
called on the wrapped map with the specified parameters.
key - put method key parametervalue - put method value parameterprotected abstract boolean prePutAll(Map<? extends K,? extends V> map)
putAll method is about to
be called on the wrapped map with the specified parameter.
Return true to proceed with the change.
map - putAll method parameter
protected abstract void postPutAll(Map<? extends K,? extends V> map)
putAll method has just been
called on the wrapped map with the specified parameter.
map - putAll method parameterprotected abstract boolean preRemove(Object key)
remove method is about to
be called on the wrapped map with the specified parameter.
Return true to proceed with the change.
key - remove method parameter
protected abstract void postRemove(Object key)
remove method has just been
called on the wrapped map with the specified parameter.
key - remove method parameterprotected abstract boolean preValuesClear()
clear method is about to
be called on the values view for the wrapped map.
Return true to proceed with the change.
protected abstract void postValuesClear()
clear method has just been
called on the values view for the wrapped map with the specified parameter.
protected abstract boolean preValuesRemove(Object value)
remove method is about to
be called on the values view for the wrapped map.
Return true to proceed with the change.
value - remove method parameter
protected abstract void postValuesRemove(Object value)
remove method has just been
called on the values view for the wrapped map with the specified parameter.
value - remove method parameterprotected abstract boolean preValuesRemoveAll(Collection<?> values)
removeAll method is about to
be called on the values view for the wrapped map.
Return true to proceed with the change.
values - removeAll method parameter
protected abstract void postValuesRemoveAll(Collection<?> values)
removeAll method has just been
called on the values view for the wrapped map with the specified parameter.
values - removeAll method parameterprotected abstract boolean preValuesRetainAll(Collection<?> values)
retainAll method is about to
be called on the values view for the wrapped map.
Return true to proceed with the change.
values - retainAll method parameter
protected abstract void postValuesRetainAll(Collection<?> values)
clear method has just been
called on the values view for the wrapped map with the specified parameter.
values - retainAll method parameterprotected abstract boolean preValuesIteratorRemove()
remove method is about to
be called on the values view iterator for the wrapped map.
Return true to proceed with the change.
protected abstract void postValuesIteratorRemove()
remove method has just been
called on the values view iterator for the wrapped map.
protected abstract boolean preKeySetClear()
clear method is about to
be called on the keySet view for the wrapped map.
Return true to proceed with the change.
protected abstract void postKeySetClear()
clear method has just been
called on the keySet view for the wrapped map with the specified parameter.
protected abstract boolean preKeySetRemove(Object value)
remove method is about to
be called on the keySet view for the wrapped map.
Return true to proceed with the change.
value - remove method parameter
protected abstract void postKeySetRemove(Object value)
remove method has just been
called on the keySet view for the wrapped map with the specified parameter.
value - remove method parameterprotected abstract boolean preKeySetRemoveAll(Collection<?> keySet)
removeAll method is about to
be called on the keySet view for the wrapped map.
Return true to proceed with the change.
keySet - removeAll method parameter
protected abstract void postKeySetRemoveAll(Collection<?> keySet)
removeAll method has just been
called on the keySet view for the wrapped map with the specified parameter.
keySet - removeAll method parameterprotected abstract boolean preKeySetRetainAll(Collection<?> keySet)
retainAll method is about to
be called on the keySet view for the wrapped map.
Return true to proceed with the change.
keySet - retainAll method parameter
protected abstract void postKeySetRetainAll(Collection<?> keySet)
clear method has just been
called on the keySet view for the wrapped map with the specified parameter.
keySet - retainAll method parameterprotected abstract boolean preKeySetIteratorRemove()
remove method is about to
be called on the keySet view iterator for the wrapped map.
Return true to proceed with the change.
protected abstract void postKeySetIteratorRemove()
remove method has just been
called on the keySet view iterator for the wrapped map.
protected abstract boolean preEntrySetClear()
clear method is about to
be called on the entrySet view for the wrapped map.
Return true to proceed with the change.
protected abstract void postEntrySetClear()
clear method has just been
called on the entrySet view for the wrapped map with the specified parameter.
protected abstract boolean preEntrySetRemove(Object value)
remove method is about to
be called on the entrySet view for the wrapped map.
Return true to proceed with the change.
value - remove method parameter
protected abstract void postEntrySetRemove(Object value)
remove method has just been
called on the entrySet view for the wrapped map with the specified parameter.
value - remove method parameterprotected abstract boolean preEntrySetRemoveAll(Collection<?> entrySet)
removeAll method is about to
be called on the entrySet view for the wrapped map.
Return true to proceed with the change.
entrySet - removeAll method parameter
protected abstract void postEntrySetRemoveAll(Collection<?> entrySet)
removeAll method has just been
called on the entrySet view for the wrapped map with the specified parameter.
entrySet - removeAll method parameterprotected abstract boolean preEntrySetRetainAll(Collection<?> entrySet)
retainAll method is about to
be called on the entrySet view for the wrapped map.
Return true to proceed with the change.
entrySet - retainAll method parameter
protected abstract void postEntrySetRetainAll(Collection<?> entrySet)
clear method has just been
called on the entrySet view for the wrapped map with the specified parameter.
entrySet - retainAll method parameterprotected abstract boolean preEntrySetIteratorRemove()
remove method is about to
be called on the entrySet view iterator for the wrapped map.
Return true to proceed with the change.
protected abstract void postEntrySetIteratorRemove()
remove method has just been
called on the entrySet view iterator for the wrapped map.
protected abstract boolean preMapEntrySetValue(V value)
setValue method is about to
be called on a map entry from the entrySet view iterator for the wrapped map.
Return true to proceed with the change.
value - setValue method parameter
protected abstract void postMapEntrySetValue(V value)
setValue method has just been
called on a map entry from the entrySet view iterator for the wrapped map.
value - setValue method parameterpublic void clear()
clear in interface Map<K,V>clear in class AbstractMapDecorator<K,V>
public V put(K key,
V value)
put in interface Map<K,V>put in class AbstractMapDecorator<K,V>public void putAll(Map<? extends K,? extends V> map)
putAll in interface Map<K,V>putAll in class AbstractMapDecorator<K,V>public V remove(Object key)
remove in interface Map<K,V>remove in class AbstractMapDecorator<K,V>public Set<Map.Entry<K,V>> entrySet()
entrySet in interface Map<K,V>entrySet in class AbstractMapDecorator<K,V>public Set<K> keySet()
keySet in interface Map<K,V>keySet in class AbstractMapDecorator<K,V>public Collection<V> values()
values in interface Map<K,V>values in class AbstractMapDecorator<K,V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||