public abstract class AbstractObservableSet extends AbstractObservable implements IObservableSet
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(Object o) |
boolean |
addAll(Collection c) |
protected void |
addListener(Object listenerType,
IObservablesListener listener) |
void |
addSetChangeListener(ISetChangeListener 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 diff) |
protected void |
firstListenerAdded() |
Realm |
getRealm() |
protected void |
getterCalled() |
protected abstract Set |
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 |
iterator() |
protected void |
lastListenerRemoved() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
protected void |
removeListener(Object listenerType,
IObservablesListener listener) |
void |
removeSetChangeListener(ISetChangeListener listener) |
boolean |
retainAll(Collection c) |
void |
setStale(boolean stale) |
int |
size() |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
String |
toString() |
addChangeListener, addDisposeListener, addStaleListener, checkRealm, dispose, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
finalize, getClass, notify, notifyAll, wait, wait, wait
getElementType
addChangeListener, addDisposeListener, addStaleListener, dispose, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
protected AbstractObservableSet()
protected AbstractObservableSet(Realm realm)
protected void firstListenerAdded()
protected void lastListenerRemoved()
public void addSetChangeListener(ISetChangeListener listener)
addSetChangeListener
in interface IObservableSet
public void removeSetChangeListener(ISetChangeListener listener)
removeSetChangeListener
in interface IObservableSet
protected abstract Set getWrappedSet()
protected void fireSetChange(SetDiff diff)
public boolean contains(Object o)
contains
in interface Collection
contains
in interface Set
contains
in interface IObservableSet
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface Set
containsAll
in interface IObservableSet
public boolean equals(Object o)
equals
in interface Collection
equals
in interface Set
equals
in interface IObservableSet
equals
in class Object
public int hashCode()
hashCode
in interface Collection
hashCode
in interface Set
hashCode
in interface IObservableSet
hashCode
in class Object
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface Set
isEmpty
in interface IObservableSet
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface Set
iterator
in interface IObservableSet
public int size()
size
in interface Collection
size
in interface Set
size
in interface IObservableSet
public Object[] toArray()
toArray
in interface Collection
toArray
in interface Set
toArray
in interface IObservableSet
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface Set
toArray
in interface IObservableSet
protected void getterCalled()
public boolean add(Object o)
add
in interface Collection
add
in interface Set
add
in interface IObservableSet
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface Set
addAll
in interface IObservableSet
public boolean remove(Object o)
remove
in interface Collection
remove
in interface Set
remove
in interface IObservableSet
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface Set
removeAll
in interface IObservableSet
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface Set
retainAll
in interface IObservableSet
public void clear()
clear
in interface Collection
clear
in interface Set
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, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.