org.eclipse.core.databinding.observable.map
Class ObservableMap
java.lang.Object
org.eclipse.core.databinding.observable.AbstractObservable
org.eclipse.core.databinding.observable.map.ObservableMap
-
All Implemented Interfaces:
-
Map,
IObservable,
IObservableMap
-
Direct Known Subclasses:
-
BidirectionalMap,
CompositeMap,
WritableMap
-
public class ObservableMap
- extends
AbstractObservable
- implements
IObservableMap
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.
-
Since:
- 1.0
Nested classes/interfaces inherited from interface java.util.
Map
|
Map.Entry<
K,
V>
|
wrappedMap
protected
Map wrappedMap
ObservableMap
public ObservableMap(
Map wrappedMap)
-
Parameters:
-
wrappedMap
-
ObservableMap
public ObservableMap(
Realm realm,
Map wrappedMap)
-
Parameters:
-
realm
- -
wrappedMap
-
addMapChangeListener
public void addMapChangeListener(
IMapChangeListener listener)
-
-
Specified by:
-
addMapChangeListener
in interface
IObservableMap
-
removeMapChangeListener
public void removeMapChangeListener(
IMapChangeListener listener)
-
-
Specified by:
-
removeMapChangeListener
in interface
IObservableMap
-
getKeyType
public
Object getKeyType()
-
Description copied from interface:
IObservableMap
- Returns the element type for the
keyset
of this
observable map, or null
if the keyset is untyped.
-
-
Specified by:
-
getKeyType
in interface
IObservableMap
-
-
Returns:
- the element type for the
keyset
of this
observable map, or null
if the keyset is untyped. -
Since:
- 1.2
getValueType
public
Object getValueType()
-
Description copied from interface:
IObservableMap
- Returns the element type for the
values
of this
observable map, or null
if the values collection is untyped.
-
-
Specified by:
-
getValueType
in interface
IObservableMap
-
-
Returns:
- the element type for the
values
of this
observable map, or null
if the values collection is
untyped. -
Since:
- 1.2
getterCalled
protected void getterCalled()
-
-
fireMapChange
protected void fireMapChange(
MapDiff diff)
-
-
containsKey
public boolean containsKey(
Object key)
-
-
Specified by:
-
containsKey
in interface
Map
-
Specified by:
-
containsKey
in interface
IObservableMap
-
containsValue
public boolean containsValue(
Object value)
-
-
Specified by:
-
containsValue
in interface
Map
-
Specified by:
-
containsValue
in interface
IObservableMap
-
entrySet
public
Set entrySet()
-
-
Specified by:
-
entrySet
in interface
Map
-
Specified by:
-
entrySet
in interface
IObservableMap
-
get
public
Object get(
Object key)
-
-
Specified by:
-
get
in interface
Map
-
Specified by:
-
get
in interface
IObservableMap
-
isEmpty
public boolean isEmpty()
-
-
Specified by:
-
isEmpty
in interface
Map
-
Specified by:
-
isEmpty
in interface
IObservableMap
-
keySet
public
Set keySet()
-
-
Specified by:
-
keySet
in interface
Map
-
Specified by:
-
keySet
in interface
IObservableMap
-
size
public int size()
-
-
Specified by:
-
size
in interface
Map
-
Specified by:
-
size
in interface
IObservableMap
-
values
public
Collection values()
-
-
Specified by:
-
values
in interface
Map
-
Specified by:
-
values
in interface
IObservableMap
-
isStale
public boolean isStale()
- Returns the stale state. Must be invoked from the current realm.
-
-
Specified by:
-
isStale
in interface
IObservable
-
-
Returns:
- stale state
setStale
public void setStale(boolean stale)
- Sets the stale state. Must be invoked from the current realm.
-
-
-
Parameters:
-
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.
put
public
Object put(
Object key,
Object value)
-
-
Specified by:
-
put
in interface
Map
-
Specified by:
-
put
in interface
IObservableMap
-
remove
public
Object remove(
Object key)
-
-
Specified by:
-
remove
in interface
Map
-
Specified by:
-
remove
in interface
IObservableMap
-
clear
public void clear()
-
-
Specified by:
-
clear
in interface
Map
-
putAll
public void putAll(
Map arg0)
-
-
Specified by:
-
putAll
in interface
Map
-
equals
public boolean equals(
Object o)
-
-
Specified by:
-
equals
in interface
Map
-
Specified by:
-
equals
in interface
IObservableMap
-
Overrides:
-
equals
in class
Object
-
hashCode
public int hashCode()
-
-
Specified by:
-
hashCode
in interface
Map
-
Specified by:
-
hashCode
in interface
IObservableMap
-
Overrides:
-
hashCode
in class
Object
-
dispose
public void dispose()
-
Description copied from interface:
IObservable
- Disposes of this observable object, removing all listeners registered
with this object, and all listeners this object might have registered on
other objects.
-
-
Specified by:
-
dispose
in interface
IObservable
-
Overrides:
-
dispose
in class
AbstractObservable
-
addListener
protected void addListener(
Object listenerType,
IObservablesListener listener)
-
-
Parameters:
-
listenerType
- -
listener
-
removeListener
protected void removeListener(
Object listenerType,
IObservablesListener listener)
-
-
Parameters:
-
listenerType
- -
listener
-
hasListeners
protected boolean hasListeners()
-
fireEvent
protected void fireEvent(
ObservableEvent event)
-
firstListenerAdded
protected void firstListenerAdded()
-
lastListenerRemoved
protected void lastListenerRemoved()
-
getRealm
public
Realm getRealm()
-
-
Returns:
- Returns the realm.
clone
protected
Object clone()
throws
CloneNotSupportedException
-
-
Overrides:
-
clone
in class
Object
-
-
Throws:
-
CloneNotSupportedException
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.