E - the type of elements in this collectionpublic abstract class ObservableSet<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 and Type | Field and Description |
|---|---|
protected java.lang.Object |
elementType |
protected java.util.Set<E> |
wrappedSet |
| Modifier | Constructor and Description |
|---|---|
protected |
ObservableSet(Realm realm,
java.util.Set<E> wrappedSet,
java.lang.Object elementType) |
protected |
ObservableSet(java.util.Set<E> wrappedSet,
java.lang.Object elementType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E o) |
boolean |
addAll(java.util.Collection<? extends E> c) |
protected void |
addListener(java.lang.Object listenerType,
IObservablesListener listener) |
void |
addSetChangeListener(ISetChangeListener<? super E> listener) |
void |
clear() |
protected java.lang.Object |
clone() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
void |
dispose()
Disposes of this observable object, removing all listeners registered
with this object, and all listeners this object might have registered on
other objects.
|
boolean |
equals(java.lang.Object o) |
protected void |
fireChange() |
protected void |
fireEvent(ObservableEvent event) |
protected void |
fireSetChange(SetDiff<E> diff) |
protected void |
firstListenerAdded() |
java.lang.Object |
getElementType()
Returns the element type of this observable collection, or
null if this observable collection is untyped. |
Realm |
getRealm() |
protected void |
getterCalled() |
int |
hashCode() |
protected boolean |
hasListeners() |
boolean |
isEmpty() |
boolean |
isStale()
Returns whether the state of this observable is stale and is expected to
change soon.
|
java.util.Iterator<E> |
iterator() |
protected void |
lastListenerRemoved() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
protected void |
removeListener(java.lang.Object listenerType,
IObservablesListener listener) |
void |
removeSetChangeListener(ISetChangeListener<? super E> listener) |
boolean |
retainAll(java.util.Collection<?> c) |
void |
setStale(boolean stale) |
protected void |
setWrappedSet(java.util.Set<E> wrappedSet) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
addChangeListener, addDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListenerfinalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListenerprotected java.util.Set<E> wrappedSet
protected java.lang.Object elementType
protected ObservableSet(java.util.Set<E> wrappedSet, java.lang.Object elementType)
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(java.lang.Object o)
contains in interface java.util.Collection<E>contains in interface java.util.Set<E>contains in interface IObservableSet<E>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<E>containsAll in interface java.util.Set<E>containsAll in interface IObservableSet<E>public boolean equals(java.lang.Object o)
equals in interface java.util.Collection<E>equals in interface java.util.Set<E>equals in interface IObservableSet<E>equals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Collection<E>hashCode in interface java.util.Set<E>hashCode in interface IObservableSet<E>hashCode in class java.lang.Objectpublic boolean isEmpty()
isEmpty in interface java.util.Collection<E>isEmpty in interface java.util.Set<E>isEmpty in interface IObservableSet<E>public java.util.Iterator<E> iterator()
public int size()
size in interface java.util.Collection<E>size in interface java.util.Set<E>size in interface IObservableSet<E>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<E>toArray in interface java.util.Set<E>toArray in interface IObservableSet<E>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<E>toArray in interface java.util.Set<E>toArray in interface IObservableSet<E>public java.lang.String toString()
toString in class java.lang.Objectprotected void getterCalled()
public boolean add(E o)
add in interface java.util.Collection<E>add in interface java.util.Set<E>add in interface IObservableSet<E>public boolean addAll(java.util.Collection<? extends E> c)
addAll in interface java.util.Collection<E>addAll in interface java.util.Set<E>addAll in interface IObservableSet<E>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<E>remove in interface java.util.Set<E>remove in interface IObservableSet<E>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<E>removeAll in interface java.util.Set<E>removeAll in interface IObservableSet<E>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<E>retainAll in interface java.util.Set<E>retainAll in interface IObservableSet<E>public void clear()
public boolean isStale()
IObservableisStale in interface IObservablepublic 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 setWrappedSet(java.util.Set<E> wrappedSet)
wrappedSet - The wrappedSet to set.protected void fireChange()
fireChange in class AbstractObservablepublic void dispose()
IObservabledispose in interface IObservabledispose in class AbstractObservablepublic java.lang.Object getElementType()
IObservableCollectionnull if this observable collection is untyped.getElementType in interface IObservableCollection<E>getElementType in interface IObservableSet<E>null if untypedprotected void addListener(java.lang.Object listenerType,
IObservablesListener listener)
listenerType - listener - protected void removeListener(java.lang.Object listenerType,
IObservablesListener listener)
listenerType - listener - protected boolean hasListeners()
protected void fireEvent(ObservableEvent event)
protected void firstListenerAdded()
protected void lastListenerRemoved()
public Realm getRealm()
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.