E
- the type of the elements in this setpublic abstract class AbstractObservableSet<E> extends AbstractObservable implements IObservableSet<E>
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.
Modifier | Constructor and Description |
---|---|
protected |
AbstractObservableSet() |
protected |
AbstractObservableSet(Realm realm) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
boolean |
addAll(Collection<? extends E> c) |
protected void |
addListener(Object listenerType,
IObservablesListener listener) |
void |
addSetChangeListener(ISetChangeListener<? super E> listener) |
void |
clear() |
protected Object |
clone() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
protected void |
fireChange() |
protected void |
fireEvent(ObservableEvent event) |
protected void |
fireSetChange(SetDiff<E> diff) |
protected void |
firstListenerAdded() |
Realm |
getRealm() |
protected void |
getterCalled() |
protected abstract Set<E> |
getWrappedSet() |
int |
hashCode() |
protected boolean |
hasListeners() |
boolean |
isEmpty() |
boolean |
isStale()
Returns whether the state of this observable is stale and is expected to
change soon.
|
Iterator<E> |
iterator() |
protected void |
lastListenerRemoved() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
protected void |
removeListener(Object listenerType,
IObservablesListener listener) |
void |
removeSetChangeListener(ISetChangeListener<? super E> listener) |
boolean |
retainAll(Collection<?> c) |
void |
setStale(boolean stale) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
addChangeListener, addDisposeListener, addStaleListener, checkRealm, dispose, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
finalize, getClass, notify, notifyAll, wait, wait, wait
getElementType
spliterator
addChangeListener, addDisposeListener, addStaleListener, dispose, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
parallelStream, removeIf, stream
protected AbstractObservableSet()
protected AbstractObservableSet(Realm realm)
protected void firstListenerAdded()
protected void lastListenerRemoved()
public void addSetChangeListener(ISetChangeListener<? super E> listener)
addSetChangeListener
in interface IObservableSet<E>
public void removeSetChangeListener(ISetChangeListener<? super E> listener)
removeSetChangeListener
in interface IObservableSet<E>
public boolean contains(Object o)
contains
in interface Collection<E>
contains
in interface Set<E>
contains
in interface IObservableSet<E>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface Set<E>
containsAll
in interface IObservableSet<E>
public boolean equals(Object o)
public int hashCode()
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in interface Set<E>
isEmpty
in interface IObservableSet<E>
public int size()
size
in interface Collection<E>
size
in interface Set<E>
size
in interface IObservableSet<E>
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in interface Set<E>
toArray
in interface IObservableSet<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
toArray
in interface Set<E>
toArray
in interface IObservableSet<E>
protected void getterCalled()
public boolean add(E o)
add
in interface Collection<E>
add
in interface Set<E>
add
in interface IObservableSet<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
addAll
in interface Set<E>
addAll
in interface IObservableSet<E>
public boolean remove(Object o)
remove
in interface Collection<E>
remove
in interface Set<E>
remove
in interface IObservableSet<E>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
removeAll
in interface Set<E>
removeAll
in interface IObservableSet<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
retainAll
in interface Set<E>
retainAll
in interface IObservableSet<E>
public void clear()
public boolean isStale()
IObservable
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.protected void fireChange()
fireChange
in class AbstractObservable
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)
public Realm getRealm()
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.