public class CompositeMap extends ObservableMap
This class is thread safe. All state accessing methods must be invoked from
the current realm
. Methods for adding and removing
listeners may be invoked from any thread.
wrappedMap
Constructor and Description |
---|
CompositeMap(IObservableMap firstMap,
IObservableFactory secondMapFactory)
Creates a new composite map.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addListener(Object listenerType,
IObservablesListener listener) |
protected Object |
clone() |
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 void |
fireEvent(ObservableEvent event) |
protected void |
firstListenerAdded() |
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 boolean |
hasListeners() |
protected void |
lastListenerRemoved() |
protected void |
removeListener(Object listenerType,
IObservablesListener listener) |
addMapChangeListener, clear, containsKey, containsValue, entrySet, equals, fireMapChange, get, getterCalled, hashCode, isEmpty, isStale, keySet, put, putAll, remove, removeMapChangeListener, setStale, size, values
addChangeListener, addDisposeListener, addStaleListener, checkRealm, fireChange, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
public CompositeMap(IObservableMap firstMap, IObservableFactory secondMapFactory)
firstMap
, it cannot be passed in as an argument. Instead,
the second map will be created by calling
secondMapFactory.createObservable(valueSet())
.firstMap
- the first mapsecondMapFactory
- a factory that creates the second map when given an observable
set representing the value set of firstMap
.public Object getKeyType()
IObservableMap
keyset
of this
observable map, or null
if the keyset is untyped.getKeyType
in interface IObservableMap
getKeyType
in class ObservableMap
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 ObservableMap
values
of this
observable map, or null
if the values collection is
untyped.public void dispose()
IObservable
dispose
in interface IObservable
dispose
in class ObservableMap
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)
protected void firstListenerAdded()
protected void lastListenerRemoved()
public Realm getRealm()
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.