K - type of the keys to the mapV - type of the values in the mappublic class DecoratingObservableMap<K,V> extends DecoratingObservable implements IObservableMap<K,V>
| Constructor and Description |
|---|
DecoratingObservableMap(IObservableMap<K,V> decorated,
boolean disposeDecoratedOnDispose)
Constructs a DecoratingObservableMap which decorates the given
observable.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addListener(java.lang.Object listenerType,
IObservablesListener listener) |
void |
addMapChangeListener(IMapChangeListener<? super K,? super V> listener) |
void |
clear() |
protected java.lang.Object |
clone() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
void |
dispose()
Disposes of this observable object, removing all listeners registered
with this object, and all listeners this object might have registered on
other objects.
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
boolean |
equals(java.lang.Object obj) |
protected void |
fireChange() |
protected void |
fireEvent(ObservableEvent event) |
protected void |
fireMapChange(MapDiff<K,V> diff) |
protected void |
firstListenerAdded() |
V |
get(java.lang.Object key) |
java.lang.Object |
getKeyType()
Returns the element type for the
keyset of this
observable map, or null if the keyset is untyped. |
Realm |
getRealm() |
java.lang.Object |
getValueType()
Returns the element type for the
values of this
observable map, or null if the values collection is untyped. |
protected void |
handleMapChange(MapChangeEvent<? extends K,? extends V> event)
Called whenever a MapChangeEvent is received from the decorated
observable.
|
int |
hashCode() |
protected boolean |
hasListeners() |
boolean |
isEmpty() |
java.util.Set<K> |
keySet() |
protected void |
lastListenerRemoved() |
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> m) |
V |
remove(java.lang.Object key) |
protected void |
removeListener(java.lang.Object listenerType,
IObservablesListener listener) |
void |
removeMapChangeListener(IMapChangeListener<? super K,? super V> listener) |
int |
size() |
java.lang.String |
toString() |
java.util.Collection<V> |
values() |
getDecorated, getterCalled, handleStaleEvent, isStaleaddChangeListener, addDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListenerfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAlladdChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, isStale, removeChangeListener, removeDisposeListener, removeStaleListenerpublic DecoratingObservableMap(IObservableMap<K,V> decorated, boolean disposeDecoratedOnDispose)
decorated - the observable map being decorateddisposeDecoratedOnDispose - public void addMapChangeListener(IMapChangeListener<? super K,? super V> listener)
addMapChangeListener in interface IObservableMap<K,V>public void removeMapChangeListener(IMapChangeListener<? super K,? super V> listener)
removeMapChangeListener in interface IObservableMap<K,V>public java.lang.Object getKeyType()
IObservableMapkeyset of this
observable map, or null if the keyset is untyped.getKeyType in interface IObservableMap<K,V>keyset of this
observable map, or null if the keyset is untyped.public java.lang.Object getValueType()
IObservableMapvalues of this
observable map, or null if the values collection is untyped.getValueType in interface IObservableMap<K,V>values of this
observable map, or null if the values collection is
untyped.protected void fireChange()
fireChange in class AbstractObservableprotected void firstListenerAdded()
firstListenerAdded in class DecoratingObservableprotected void lastListenerRemoved()
lastListenerRemoved in class DecoratingObservableprotected void handleMapChange(MapChangeEvent<? extends K,? extends V> event)
event - the change event received from the decorated observablepublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<K,V>containsKey in interface IObservableMap<K,V>public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<K,V>containsValue in interface IObservableMap<K,V>public V get(java.lang.Object key)
public boolean isEmpty()
public java.util.Set<K> keySet()
public V remove(java.lang.Object key)
public int size()
public java.util.Collection<V> values()
public boolean equals(java.lang.Object obj)
equals in interface java.util.Map<K,V>equals in interface IObservableMap<K,V>equals in class DecoratingObservablepublic int hashCode()
hashCode in interface java.util.Map<K,V>hashCode in interface IObservableMap<K,V>hashCode in class DecoratingObservablepublic java.lang.String toString()
toString in class java.lang.Objectpublic void dispose()
IObservabledispose in interface IObservabledispose in class DecoratingObservableprotected void addListener(java.lang.Object listenerType,
IObservablesListener listener)
listenerType - listener - protected void removeListener(java.lang.Object listenerType,
IObservablesListener listener)
listenerType - listener - protected boolean hasListeners()
protected void fireEvent(ObservableEvent event)
public Realm getRealm()
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.