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(Object listenerType,
IObservablesListener listener) |
void |
addMapChangeListener(IMapChangeListener<? super K,? super V> listener) |
void |
clear() |
protected Object |
clone() |
boolean |
containsKey(Object key) |
boolean |
containsValue(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.
|
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object obj) |
protected void |
fireChange() |
protected void |
fireEvent(ObservableEvent event) |
protected void |
fireMapChange(MapDiff<K,V> diff) |
protected void |
firstListenerAdded() |
V |
get(Object key) |
Object |
getKeyType()
Returns the element type for the
keyset of this
observable map, or null if the keyset is untyped. |
Realm |
getRealm() |
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() |
Set<K> |
keySet() |
protected void |
lastListenerRemoved() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
protected void |
removeListener(Object listenerType,
IObservablesListener listener) |
void |
removeMapChangeListener(IMapChangeListener<? super K,? super V> listener) |
int |
size() |
String |
toString() |
Collection<V> |
values() |
getDecorated, getterCalled, handleStaleEvent, isStale
addChangeListener, addDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, isStale, removeChangeListener, removeDisposeListener, removeStaleListener
public 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 Object getKeyType()
IObservableMap
keyset
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 Object getValueType()
IObservableMap
values
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 AbstractObservable
protected void firstListenerAdded()
firstListenerAdded
in class DecoratingObservable
protected void lastListenerRemoved()
lastListenerRemoved
in class DecoratingObservable
protected void handleMapChange(MapChangeEvent<? extends K,? extends V> event)
event
- the change event received from the decorated observablepublic boolean containsKey(Object key)
containsKey
in interface Map<K,V>
containsKey
in interface IObservableMap<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
containsValue
in interface IObservableMap<K,V>
public boolean isEmpty()
public int size()
public Collection<V> values()
public boolean equals(Object obj)
equals
in interface Map<K,V>
equals
in interface IObservableMap<K,V>
equals
in class DecoratingObservable
public int hashCode()
hashCode
in interface Map<K,V>
hashCode
in interface IObservableMap<K,V>
hashCode
in class DecoratingObservable
public void dispose()
IObservable
dispose
in interface IObservable
dispose
in class DecoratingObservable
protected void addListener(Object listenerType, IObservablesListener listener)
listenerType
- listener
- protected void removeListener(Object listenerType, IObservablesListener listener)
listenerType
- listener
- protected boolean hasListeners()
protected void fireEvent(ObservableEvent event)
public Realm getRealm()
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.