|
Eclipse Platform Release 3.6 |
|||||||||
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
public class 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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
protected java.util.Map |
wrappedMap
|
Constructor Summary | |
---|---|
ObservableMap(java.util.Map wrappedMap)
|
|
ObservableMap(Realm realm,
java.util.Map wrappedMap)
|
Method Summary | |
---|---|
protected void |
addListener(java.lang.Object listenerType,
IObservablesListener listener)
|
void |
addMapChangeListener(IMapChangeListener listener)
|
void |
clear()
|
protected java.lang.Object |
clone()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.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. |
java.util.Set |
entrySet()
|
boolean |
equals(java.lang.Object o)
|
protected void |
fireEvent(ObservableEvent event)
|
protected void |
fireMapChange(MapDiff diff)
|
protected void |
firstListenerAdded()
|
java.lang.Object |
get(java.lang.Object key)
|
java.lang.Object |
getKeyType()
Returns the element type for the keyset of this
observable map, or null if the keyset is untyped. |
Realm |
getRealm()
|
protected void |
getterCalled()
|
java.lang.Object |
getValueType()
Returns the element type for the values of this
observable map, or null if the values collection is untyped. |
int |
hashCode()
|
protected boolean |
hasListeners()
|
boolean |
isEmpty()
|
boolean |
isStale()
Returns the stale state. |
java.util.Set |
keySet()
|
protected void |
lastListenerRemoved()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
putAll(java.util.Map arg0)
|
java.lang.Object |
remove(java.lang.Object key)
|
protected void |
removeListener(java.lang.Object listenerType,
IObservablesListener listener)
|
void |
removeMapChangeListener(IMapChangeListener listener)
|
void |
setStale(boolean stale)
Sets the stale state. |
int |
size()
|
java.util.Collection |
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 |
Field Detail |
---|
protected java.util.Map wrappedMap
Constructor Detail |
---|
public ObservableMap(java.util.Map wrappedMap)
wrappedMap
- public ObservableMap(Realm realm, java.util.Map wrappedMap)
realm
- wrappedMap
- Method Detail |
---|
public void addMapChangeListener(IMapChangeListener listener)
addMapChangeListener
in interface IObservableMap
public void removeMapChangeListener(IMapChangeListener listener)
removeMapChangeListener
in interface IObservableMap
public java.lang.Object getKeyType()
IObservableMap
keyset
of this
observable map, or null
if the keyset is untyped.
getKeyType
in interface IObservableMap
keyset
of this
observable map, or null
if the keyset is untyped.public java.lang.Object getValueType()
IObservableMap
values
of this
observable map, or null
if the values collection is untyped.
getValueType
in interface IObservableMap
values
of this
observable map, or null
if the values collection is
untyped.protected void getterCalled()
protected void fireMapChange(MapDiff diff)
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map
containsKey
in interface IObservableMap
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map
containsValue
in interface IObservableMap
public java.util.Set entrySet()
entrySet
in interface java.util.Map
entrySet
in interface IObservableMap
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map
get
in interface IObservableMap
public boolean isEmpty()
isEmpty
in interface java.util.Map
isEmpty
in interface IObservableMap
public java.util.Set keySet()
keySet
in interface java.util.Map
keySet
in interface IObservableMap
public int size()
size
in interface java.util.Map
size
in interface IObservableMap
public java.util.Collection values()
values
in interface java.util.Map
values
in interface IObservableMap
public boolean isStale()
isStale
in interface IObservable
public void setStale(boolean stale)
stale
- The stale state to set. This will fire a stale event if the
given boolean is true and this observable set was not already
stale.public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
put
in interface IObservableMap
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map
remove
in interface IObservableMap
public void clear()
clear
in interface java.util.Map
public void putAll(java.util.Map arg0)
putAll
in interface java.util.Map
public boolean equals(java.lang.Object o)
equals
in interface java.util.Map
equals
in interface IObservableMap
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Map
hashCode
in interface IObservableMap
hashCode
in class java.lang.Object
public void dispose()
IObservable
dispose
in interface IObservable
dispose
in class AbstractObservable
protected void addListener(java.lang.Object listenerType, IObservablesListener listener)
listenerType
- listener
- protected void removeListener(java.lang.Object listenerType, IObservablesListener listener)
listenerType
- listener
- protected boolean hasListeners()
protected void fireEvent(ObservableEvent event)
protected void firstListenerAdded()
protected void lastListenerRemoved()
public Realm getRealm()
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
Eclipse Platform Release 3.6 |
|||||||||
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, 2010. All rights reserved.