|
|
|
|
org.eclipse.core.databinding.observable.set
Class WritableSet
java.lang.Object
org.eclipse.core.databinding.observable.AbstractObservable
org.eclipse.core.databinding.observable.set.ObservableSet
org.eclipse.core.databinding.observable.set.WritableSet
-
All Implemented Interfaces:
-
Iterable,
Collection,
Set,
IObservable,
IObservableCollection,
IObservableSet
-
public class WritableSet
- extends
ObservableSet
Mutable (writable) implementation of
IObservableSet .
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
Constructor Summary
|
WritableSet
()
Constructs a new empty instance in the default realm with a
null element type. |
WritableSet
(
Collection c,
Object elementType)
Constructs a new instance in the default realm containing the
elements of the given collection. |
WritableSet
(
Realm realm)
Constructs a new empty instance in the given realm and a
null element type. |
WritableSet
(
Realm realm,
Collection c,
Object elementType)
Constructs a new instance in the default realm with the given element
type, containing the elements of the given collection. |
Methods inherited from class org.eclipse.core.databinding.observable.set.
ObservableSet
|
addSetChangeListener,
contains,
containsAll,
dispose,
equals,
fireChange,
fireSetChange,
getElementType,
getterCalled,
hashCode,
isEmpty,
isStale,
iterator,
removeSetChangeListener,
setStale,
setWrappedSet,
size,
toArray,
toArray,
toString
|
WritableSet
public WritableSet()
- Constructs a new empty instance in the default realm with a
null element type.
WritableSet
public WritableSet(
Collection c,
Object elementType)
- Constructs a new instance in the default realm containing the
elements of the given collection. Changes to the given collection after
calling this method do not affect the contents of the created WritableSet.
-
Parameters:
-
c - -
elementType - can be null
WritableSet
public WritableSet(
Realm realm)
- Constructs a new empty instance in the given realm and a
null element type.
-
Parameters:
-
realm -
WritableSet
public WritableSet(
Realm realm,
Collection c,
Object elementType)
- Constructs a new instance in the default realm with the given element
type, containing the elements of the given collection. Changes to the
given collection after calling this method do not affect the contents of
the created WritableSet.
-
Parameters:
-
realm - -
c - -
elementType - can be null
add
public boolean add(
Object o)
-
-
Specified by:
-
add
in interface
Collection
-
Specified by:
-
add
in interface
Set
-
Specified by:
-
add
in interface
IObservableSet
-
Overrides:
-
add
in class
ObservableSet
-
addAll
public boolean addAll(
Collection c)
-
-
Specified by:
-
addAll
in interface
Collection
-
Specified by:
-
addAll
in interface
Set
-
Specified by:
-
addAll
in interface
IObservableSet
-
Overrides:
-
addAll
in class
ObservableSet
-
remove
public boolean remove(
Object o)
-
-
Specified by:
-
remove
in interface
Collection
-
Specified by:
-
remove
in interface
Set
-
Specified by:
-
remove
in interface
IObservableSet
-
Overrides:
-
remove
in class
ObservableSet
-
removeAll
public boolean removeAll(
Collection c)
-
-
Specified by:
-
removeAll
in interface
Collection
-
Specified by:
-
removeAll
in interface
Set
-
Specified by:
-
removeAll
in interface
IObservableSet
-
Overrides:
-
removeAll
in class
ObservableSet
-
retainAll
public boolean retainAll(
Collection c)
-
-
Specified by:
-
retainAll
in interface
Collection
-
Specified by:
-
retainAll
in interface
Set
-
Specified by:
-
retainAll
in interface
IObservableSet
-
Overrides:
-
retainAll
in class
ObservableSet
-
clear
public void clear()
-
-
Specified by:
-
clear
in interface
Collection
-
Specified by:
-
clear
in interface
Set
-
Overrides:
-
clear
in class
ObservableSet
-
withElementType
public static
WritableSet withElementType(
Object elementType)
-
-
Parameters:
-
elementType - can be null
-
Returns:
- new instance with the default realm
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.
|
|
|