K
- type of the keys to the mapV
- type of the values in the mappublic abstract class ComputedObservableMap<K,V> extends AbstractObservableMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
ComputedObservableMap(IObservableSet<K> keySet) |
ComputedObservableMap(IObservableSet<K> keySet,
Object valueType) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key) |
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.
|
protected abstract V |
doGet(K key) |
protected abstract V |
doPut(K key,
V value) |
Set<Map.Entry<K,V>> |
entrySet() |
protected void |
fireSingleChange(K key,
V oldValue,
V newValue) |
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. |
Object |
getValueType()
Returns the element type for the
values of this
observable map, or null if the values collection is untyped. |
protected abstract void |
hookListener(K addedKey) |
protected void |
init()
Deprecated.
Subclasses are no longer required to call this method.
|
boolean |
isStale()
Returns whether the state of this observable is stale and is expected to
change soon.
|
Set<K> |
keySet() |
protected void |
lastListenerRemoved() |
V |
put(K key,
V value) |
V |
remove(Object key) |
protected abstract void |
unhookListener(K removedKey) |
addChangeListener, addDisposeListener, addMapChangeListener, addStaleListener, checkRealm, fireChange, fireMapChange, fireStale, getRealm, hasListeners, isDisposed, removeChangeListener, removeDisposeListener, removeMapChangeListener, removeStaleListener, setStale
clear, clone, containsValue, equals, hashCode, isEmpty, putAll, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
containsValue, equals, hashCode, isEmpty, size, values
clear, compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll
public ComputedObservableMap(IObservableSet<K> keySet)
keySet
- public ComputedObservableMap(IObservableSet<K> keySet, Object valueType)
keySet
- valueType
- @Deprecated protected void init()
protected void firstListenerAdded()
firstListenerAdded
in class AbstractObservableMap<K,V>
protected void lastListenerRemoved()
lastListenerRemoved
in class AbstractObservableMap<K,V>
public Object getKeyType()
IObservableMap
keyset
of this
observable map, or null
if the keyset is untyped.getKeyType
in interface IObservableMap<K,V>
getKeyType
in class AbstractObservableMap<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>
getValueType
in class AbstractObservableMap<K,V>
values
of this
observable map, or null
if the values collection is
untyped.public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
containsKey
in interface IObservableMap<K,V>
containsKey
in class AbstractMap<K,V>
protected abstract void unhookListener(K removedKey)
removedKey
- protected abstract void hookListener(K addedKey)
addedKey
- protected abstract V doPut(K key, V value)
key
- value
- public boolean isStale()
IObservable
isStale
in interface IObservable
isStale
in class AbstractObservableMap<K,V>
public void dispose()
IObservable
dispose
in interface IObservable
dispose
in class AbstractObservableMap<K,V>
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.