public class WritableSet extends ObservableSet
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.
elementType, wrappedSet
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
protected void |
addListener(Object listenerType,
IObservablesListener listener) |
void |
clear() |
protected Object |
clone() |
protected void |
fireEvent(ObservableEvent event) |
protected void |
firstListenerAdded() |
Realm |
getRealm() |
protected boolean |
hasListeners() |
protected void |
lastListenerRemoved() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
protected void |
removeListener(Object listenerType,
IObservablesListener listener) |
boolean |
retainAll(Collection c) |
static WritableSet |
withElementType(Object elementType) |
addSetChangeListener, contains, containsAll, dispose, equals, fireChange, fireSetChange, getElementType, getterCalled, hashCode, isEmpty, isStale, iterator, removeSetChangeListener, setStale, setWrappedSet, size, toArray, toArray, toString
addChangeListener, addDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
parallelStream, removeIf, stream
public WritableSet()
null
element type.public WritableSet(Collection c, Object elementType)
c
- elementType
- can be null
public WritableSet(Realm realm)
null
element type.realm
- public WritableSet(Realm realm, Collection c, Object elementType)
realm
- c
- elementType
- can be null
public boolean add(Object o)
add
in interface Collection
add
in interface Set
add
in interface IObservableSet
add
in class ObservableSet
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface Set
addAll
in interface IObservableSet
addAll
in class ObservableSet
public boolean remove(Object o)
remove
in interface Collection
remove
in interface Set
remove
in interface IObservableSet
remove
in class ObservableSet
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface Set
removeAll
in interface IObservableSet
removeAll
in class ObservableSet
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface Set
retainAll
in interface IObservableSet
retainAll
in class ObservableSet
public void clear()
clear
in interface Collection
clear
in interface Set
clear
in class ObservableSet
public static WritableSet withElementType(Object elementType)
elementType
- can be null
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 Object
CloneNotSupportedException
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.