|
Eclipse Platform Kepler (4.3) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.databinding.observable.AbstractObservable
org.eclipse.core.databinding.observable.set.ObservableSet
public abstract class ObservableSet
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.
Field Summary | |
---|---|
protected java.lang.Object |
elementType
|
protected java.util.Set |
wrappedSet
|
Constructor Summary | |
---|---|
protected |
ObservableSet(Realm realm,
java.util.Set wrappedSet,
java.lang.Object elementType)
|
protected |
ObservableSet(java.util.Set wrappedSet,
java.lang.Object elementType)
|
Method Summary | |
---|---|
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
protected void |
addListener(java.lang.Object listenerType,
IObservablesListener listener)
|
void |
addSetChangeListener(ISetChangeListener 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 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 |
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 listener)
|
boolean |
retainAll(java.util.Collection c)
|
void |
setStale(boolean stale)
|
protected void |
setWrappedSet(java.util.Set wrappedSet)
|
int |
size()
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
java.lang.String |
toString()
|
Methods inherited from class org.eclipse.core.databinding.observable.AbstractObservable |
---|
addChangeListener, addDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.core.databinding.observable.IObservable |
---|
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener |
Field Detail |
---|
protected java.util.Set wrappedSet
protected java.lang.Object elementType
Constructor Detail |
---|
protected ObservableSet(java.util.Set wrappedSet, java.lang.Object elementType)
protected ObservableSet(Realm realm, java.util.Set wrappedSet, java.lang.Object elementType)
Method Detail |
---|
public void addSetChangeListener(ISetChangeListener listener)
addSetChangeListener
in interface IObservableSet
public void removeSetChangeListener(ISetChangeListener listener)
removeSetChangeListener
in interface IObservableSet
protected void fireSetChange(SetDiff diff)
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.Set
contains
in interface IObservableSet
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.Set
containsAll
in interface IObservableSet
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection
equals
in interface java.util.Set
equals
in interface IObservableSet
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.Set
hashCode
in interface IObservableSet
hashCode
in class java.lang.Object
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.Set
isEmpty
in interface IObservableSet
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.Set
iterator
in interface IObservableSet
public int size()
size
in interface java.util.Collection
size
in interface java.util.Set
size
in interface IObservableSet
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
toArray
in interface IObservableSet
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
toArray
in interface IObservableSet
public java.lang.String toString()
toString
in class java.lang.Object
protected void getterCalled()
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.Set
add
in interface IObservableSet
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.Set
addAll
in interface IObservableSet
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.Set
remove
in interface IObservableSet
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.Set
removeAll
in interface IObservableSet
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.Set
retainAll
in interface IObservableSet
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.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 setWrappedSet(java.util.Set wrappedSet)
wrappedSet
- The wrappedSet to set.protected void fireChange()
fireChange
in class AbstractObservable
public void dispose()
IObservable
dispose
in interface IObservable
dispose
in class AbstractObservable
public java.lang.Object getElementType()
IObservableCollection
null
if this observable collection is untyped.
getElementType
in interface IObservableCollection
getElementType
in interface IObservableSet
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.Object
java.lang.CloneNotSupportedException
|
Eclipse Platform Kepler (4.3) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2012. All rights reserved.