public abstract class ComputedObservableMap extends AbstractObservableMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
ComputedObservableMap(IObservableSet keySet) |
ComputedObservableMap(IObservableSet 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 Object |
doGet(Object key) |
protected abstract Object |
doPut(Object key,
Object value) |
Set |
entrySet() |
protected void |
fireSingleChange(Object key,
Object oldValue,
Object newValue) |
protected void |
firstListenerAdded() |
Object |
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(Object 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 |
keySet() |
protected void |
lastListenerRemoved() |
Object |
put(Object key,
Object value) |
Object |
remove(Object key) |
protected abstract void |
unhookListener(Object 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
public ComputedObservableMap(IObservableSet keySet)
keySet
- public ComputedObservableMap(IObservableSet keySet, Object valueType)
keySet
- valueType
- protected void init()
protected void firstListenerAdded()
firstListenerAdded
in class AbstractObservableMap
protected void lastListenerRemoved()
lastListenerRemoved
in class AbstractObservableMap
protected final void fireSingleChange(Object key, Object oldValue, Object newValue)
public Object getKeyType()
IObservableMap
keyset
of this
observable map, or null
if the keyset is untyped.getKeyType
in interface IObservableMap
getKeyType
in class AbstractObservableMap
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
getValueType
in class AbstractObservableMap
values
of this
observable map, or null
if the values collection is
untyped.public Object remove(Object key)
remove
in interface Map
remove
in interface IObservableMap
remove
in class AbstractMap
public boolean containsKey(Object key)
containsKey
in interface Map
containsKey
in interface IObservableMap
containsKey
in class AbstractMap
public Set entrySet()
entrySet
in interface Map
entrySet
in interface IObservableMap
entrySet
in class AbstractMap
public Set keySet()
keySet
in interface Map
keySet
in interface IObservableMap
keySet
in class AbstractMap
public final Object get(Object key)
get
in interface Map
get
in interface IObservableMap
get
in class AbstractMap
public final Object put(Object key, Object value)
put
in interface Map
put
in interface IObservableMap
put
in class AbstractMap
protected abstract void unhookListener(Object removedKey)
removedKey
- protected abstract void hookListener(Object addedKey)
addedKey
- protected abstract Object doGet(Object key)
key
- protected abstract Object doPut(Object key, Object value)
key
- value
- public boolean isStale()
IObservable
isStale
in interface IObservable
isStale
in class AbstractObservableMap
public void dispose()
IObservable
dispose
in interface IObservable
dispose
in class AbstractObservableMap
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.