|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.databinding.observable.AbstractObservable
org.eclipse.core.databinding.observable.map.ObservableMap
org.eclipse.core.databinding.observable.map.WritableMap
public class WritableMap
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary |
|---|
| Fields inherited from class org.eclipse.core.databinding.observable.map.ObservableMap |
|---|
wrappedMap |
| Constructor Summary | |
|---|---|
WritableMap()
Constructs a new WritableMap on the default realm. |
|
WritableMap(Object keyType,
Object valueType)
Constructs a new WritableMap on the default realm with the specified key and value types. |
|
WritableMap(Realm realm)
Constructs a new WritableMap on the given realm. |
|
WritableMap(Realm realm,
Object keyType,
Object valueType)
Constructs a new WritableMap on the given realm with the specified key and value types. |
|
| Method Summary | |
|---|---|
protected void |
addListener(Object listenerType,
IObservablesListener listener)
|
void |
clear()
Clears the map. |
protected Object |
clone()
|
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()
|
Object |
put(Object key,
Object value)
Associates the provided value with the key. |
void |
putAll(Map map)
Adds the provided map's contents to this map. |
Object |
remove(Object key)
Removes the value with the provide key. |
protected void |
removeListener(Object listenerType,
IObservablesListener listener)
|
| Methods inherited from class org.eclipse.core.databinding.observable.map.ObservableMap |
|---|
addMapChangeListener, containsKey, containsValue, dispose, entrySet, equals, fireMapChange, get, getterCalled, hashCode, isEmpty, isStale, keySet, removeMapChangeListener, setStale, size, values |
| Methods inherited from class org.eclipse.core.databinding.observable.AbstractObservable |
|---|
addChangeListener, addDisposeListener, addStaleListener, checkRealm, fireChange, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.databinding.observable.IObservable |
|---|
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener |
| Constructor Detail |
|---|
public WritableMap()
public WritableMap(Realm realm)
realm - the realm
public WritableMap(Object keyType,
Object valueType)
keyType - valueType -
public WritableMap(Realm realm,
Object keyType,
Object valueType)
realm - keyType - valueType - | Method Detail |
|---|
public Object getKeyType()
IObservableMapkeyset of this
observable map, or null if the keyset is untyped.
getKeyType in interface IObservableMapgetKeyType in class ObservableMapkeyset of this
observable map, or null if the keyset is untyped.public Object getValueType()
IObservableMapvalues of this
observable map, or null if the values collection is untyped.
getValueType in interface IObservableMapgetValueType in class ObservableMapvalues of this
observable map, or null if the values collection is
untyped.
public Object put(Object key,
Object value)
value with the key. Must be invoked from the current realm.
put in interface Mapput in interface IObservableMapput in class ObservableMappublic Object remove(Object key)
key. Must be invoked from the current realm.
remove in interface Mapremove in interface IObservableMapremove in class ObservableMappublic void clear()
clear in interface Mapclear in class ObservableMappublic void putAll(Map map)
map's contents to this map. Must be invoked from the current realm.
putAll in interface MapputAll 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 ObjectCloneNotSupportedException
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.