org.eclipse.core.databinding.observable.set
Class ObservableSet
java.lang.Object
org.eclipse.core.databinding.observable.AbstractObservable
org.eclipse.core.databinding.observable.set.ObservableSet
-
All Implemented Interfaces:
-
Iterable,
Collection,
Set,
IObservable,
IObservableCollection,
IObservableSet
-
Direct Known Subclasses:
-
ListToSetAdapter,
MappedSet,
UnionSet,
WritableSet
-
public abstract class ObservableSet
- extends
AbstractObservable
- implements
IObservableSet
Abstract 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
wrappedSet
protected
Set wrappedSet
elementType
protected
Object elementType
ObservableSet
protected ObservableSet(
Set wrappedSet,
Object elementType)
ObservableSet
protected ObservableSet(
Realm realm,
Set wrappedSet,
Object elementType)
addSetChangeListener
public void addSetChangeListener(
ISetChangeListener listener)
-
-
Specified by:
-
addSetChangeListener
in interface
IObservableSet
-
removeSetChangeListener
public void removeSetChangeListener(
ISetChangeListener listener)
-
-
Specified by:
-
removeSetChangeListener
in interface
IObservableSet
-
fireSetChange
protected void fireSetChange(
SetDiff diff)
-
-
contains
public boolean contains(
Object o)
-
-
Specified by:
-
contains
in interface
Collection
-
Specified by:
-
contains
in interface
Set
-
Specified by:
-
contains
in interface
IObservableSet
-
containsAll
public boolean containsAll(
Collection c)
-
-
Specified by:
-
containsAll
in interface
Collection
-
Specified by:
-
containsAll
in interface
Set
-
Specified by:
-
containsAll
in interface
IObservableSet
-
equals
public boolean equals(
Object o)
-
-
Specified by:
-
equals
in interface
Collection
-
Specified by:
-
equals
in interface
Set
-
Specified by:
-
equals
in interface
IObservableSet
-
Overrides:
-
equals
in class
Object
-
hashCode
public int hashCode()
-
-
Specified by:
-
hashCode
in interface
Collection
-
Specified by:
-
hashCode
in interface
Set
-
Specified by:
-
hashCode
in interface
IObservableSet
-
Overrides:
-
hashCode
in class
Object
-
isEmpty
public boolean isEmpty()
-
-
Specified by:
-
isEmpty
in interface
Collection
-
Specified by:
-
isEmpty
in interface
Set
-
Specified by:
-
isEmpty
in interface
IObservableSet
-
iterator
public
Iterator iterator()
-
-
Specified by:
-
iterator
in interface
Iterable
-
Specified by:
-
iterator
in interface
Collection
-
Specified by:
-
iterator
in interface
Set
-
Specified by:
-
iterator
in interface
IObservableSet
-
size
public int size()
-
-
Specified by:
-
size
in interface
Collection
-
Specified by:
-
size
in interface
Set
-
Specified by:
-
size
in interface
IObservableSet
-
toArray
public
Object[] toArray()
-
-
Specified by:
-
toArray
in interface
Collection
-
Specified by:
-
toArray
in interface
Set
-
Specified by:
-
toArray
in interface
IObservableSet
-
toArray
public
Object[] toArray(
Object[] a)
-
-
Specified by:
-
toArray
in interface
Collection
-
Specified by:
-
toArray
in interface
Set
-
Specified by:
-
toArray
in interface
IObservableSet
-
toString
public
String toString()
-
-
Overrides:
-
toString
in class
Object
-
getterCalled
protected void getterCalled()
-
-
add
public boolean add(
Object o)
-
-
Specified by:
-
add
in interface
Collection
-
Specified by:
-
add
in interface
Set
-
Specified by:
-
add
in interface
IObservableSet
-
addAll
public boolean addAll(
Collection c)
-
-
Specified by:
-
addAll
in interface
Collection
-
Specified by:
-
addAll
in interface
Set
-
Specified by:
-
addAll
in interface
IObservableSet
-
remove
public boolean remove(
Object o)
-
-
Specified by:
-
remove
in interface
Collection
-
Specified by:
-
remove
in interface
Set
-
Specified by:
-
remove
in interface
IObservableSet
-
removeAll
public boolean removeAll(
Collection c)
-
-
Specified by:
-
removeAll
in interface
Collection
-
Specified by:
-
removeAll
in interface
Set
-
Specified by:
-
removeAll
in interface
IObservableSet
-
retainAll
public boolean retainAll(
Collection c)
-
-
Specified by:
-
retainAll
in interface
Collection
-
Specified by:
-
retainAll
in interface
Set
-
Specified by:
-
retainAll
in interface
IObservableSet
-
clear
public void clear()
-
-
Specified by:
-
clear
in interface
Collection
-
Specified by:
-
clear
in interface
Set
-
isStale
public boolean isStale()
-
Description copied from interface:
IObservable
- Returns whether the state of this observable is stale and is expected to
change soon. A non-stale observable that becomes stale will notify its
stale listeners. A stale object that becomes non-stale does so by
changing its state and notifying its change listeners, it does not
notify its stale listeners about becoming non-stale. Clients that do not
expect asynchronous changes may ignore staleness of observable objects.
-
-
Specified by:
-
isStale
in interface
IObservable
-
-
Returns:
- Returns the stale state.
setStale
public void setStale(boolean stale)
-
-
-
Parameters:
-
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.
setWrappedSet
protected void setWrappedSet(
Set wrappedSet)
-
-
-
Parameters:
-
wrappedSet - The wrappedSet to set.
fireChange
protected void fireChange()
-
-
Overrides:
-
fireChange
in class
AbstractObservable
-
dispose
public void dispose()
-
Description copied from interface:
IObservable
- Disposes of this observable object, removing all listeners registered
with this object, and all listeners this object might have registered on
other objects.
-
-
Specified by:
-
dispose
in interface
IObservable
-
Overrides:
-
dispose
in class
AbstractObservable
-
getElementType
public
Object getElementType()
-
Description copied from interface:
IObservableCollection
- Returns the element type of this observable collection, or
null if this observable collection is untyped.
-
-
Specified by:
-
getElementType
in interface
IObservableCollection
-
Specified by:
-
getElementType
in interface
IObservableSet
-
-
Returns:
- the element type or
null if untyped
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.