|
 |
|
|
org.eclipse.core.databinding.observable.map
Class WritableMap
java.lang.Object
org.eclipse.core.databinding.observable.AbstractObservable
org.eclipse.core.databinding.observable.map.ObservableMap
org.eclipse.core.databinding.observable.map.WritableMap
-
All Implemented Interfaces:
-
Map,
IObservable,
IObservableMap
-
public class WritableMap
- 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.
-
Since:
- 1.0
Nested classes/interfaces inherited from interface java.util.
Map
|
Map.Entry<
K,
V>
|
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. |
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
|
WritableMap
public WritableMap()
- Constructs a new WritableMap on the default realm.
WritableMap
public WritableMap(
Realm realm)
- Constructs a new WritableMap on the given realm.
-
Parameters:
-
realm - the realm
WritableMap
public WritableMap(
Object keyType,
Object valueType)
- Constructs a new WritableMap on the default realm with the specified key
and value types.
-
Parameters:
-
keyType - -
valueType - -
Since:
- 1.2
WritableMap
public WritableMap(
Realm realm,
Object keyType,
Object valueType)
- Constructs a new WritableMap on the given realm with the specified key
and value types.
-
Parameters:
-
realm - -
keyType - -
valueType - -
Since:
- 1.2
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
-
Overrides:
-
getKeyType
in class
ObservableMap
-
-
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
-
Overrides:
-
getValueType
in class
ObservableMap
-
-
Returns:
- the element type for the
values of this
observable map, or null if the values collection is
untyped. -
Since:
- 1.2
put
public
Object put(
Object key,
Object value)
- Associates the provided
value with the key . Must be invoked from the current realm.
-
-
Specified by:
-
put
in interface
Map
-
Specified by:
-
put
in interface
IObservableMap
-
Overrides:
-
put
in class
ObservableMap
-
remove
public
Object remove(
Object key)
- Removes the value with the provide
key . Must be invoked from the current realm.
-
-
Specified by:
-
remove
in interface
Map
-
Specified by:
-
remove
in interface
IObservableMap
-
Overrides:
-
remove
in class
ObservableMap
-
clear
public void clear()
- Clears the map. Must be invoked from the current realm.
-
-
Specified by:
-
clear
in interface
Map
-
Overrides:
-
clear
in class
ObservableMap
-
putAll
public void putAll(
Map map)
- Adds the provided
map 's contents to this map. Must be invoked from the current realm.
-
-
Specified by:
-
putAll
in interface
Map
-
Overrides:
-
putAll
in class
ObservableMap
-
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.
|
|
|