Class DecoratingObservableCollection<E>
java.lang.Object
org.eclipse.core.databinding.observable.AbstractObservable
org.eclipse.core.databinding.observable.DecoratingObservable
org.eclipse.core.databinding.observable.DecoratingObservableCollection<E>
- Type Parameters:
E
- type of the elements in the collection
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,IDecoratingObservable
,IObservable
,IObservableCollection<E>
- Direct Known Subclasses:
DecoratingObservableList
,DecoratingObservableSet
public class DecoratingObservableCollection<E>
extends DecoratingObservable
implements IObservableCollection<E>
An observable collection which decorates another observable collection
- Since:
- 1.2
- Implementation Note:
- If methods are added to the interface which this class implements then implementations of those methods must be added to this class.
-
Constructor Summary
ConstructorDescriptionDecoratingObservableCollection
(IObservableCollection<E> decorated, boolean disposeDecoratedOnDispose) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends E> c) protected void
addListener
(Object listenerType, IObservablesListener listener) void
clear()
protected Object
clone()
boolean
boolean
containsAll
(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
protected void
fireEvent
(ObservableEvent event) Returns the element type of this observable collection, ornull
if this observable collection is untyped.getRealm()
int
hashCode()
protected boolean
boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> c) protected void
removeListener
(Object listenerType, IObservablesListener listener) boolean
retainAll
(Collection<?> c) int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) toString()
Methods inherited from class org.eclipse.core.databinding.observable.DecoratingObservable
firstListenerAdded, getDecorated, getterCalled, handleStaleEvent, isStale, lastListenerRemoved
Methods inherited from class org.eclipse.core.databinding.observable.AbstractObservable
addChangeListener, addDisposeListener, addStaleListener, checkRealm, fireChange, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
Methods inherited from interface org.eclipse.core.databinding.observable.IObservable
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, isStale, removeChangeListener, removeDisposeListener, removeStaleListener
-
Constructor Details
-
DecoratingObservableCollection
public DecoratingObservableCollection(IObservableCollection<E> decorated, boolean disposeDecoratedOnDispose) - Parameters:
decorated
- the observable being decorated.disposeDecoratedOnDispose
- whether the decorated observable should be disposed when the decorator is disposed
-
-
Method Details
-
add
- Specified by:
add
in interfaceCollection<E>
-
addAll
- Specified by:
addAll
in interfaceCollection<E>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<E>
-
contains
- Specified by:
contains
in interfaceCollection<E>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<E>
-
iterator
-
remove
- Specified by:
remove
in interfaceCollection<E>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<E>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<E>
-
size
public int size()- Specified by:
size
in interfaceCollection<E>
-
toArray
- Specified by:
toArray
in interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<E>
-
getElementType
Description copied from interface:IObservableCollection
Returns the element type of this observable collection, ornull
if this observable collection is untyped.- Specified by:
getElementType
in interfaceIObservableCollection<E>
- Returns:
- the element type of this observable collection, or
null
if this observable collection is untyped.
-
equals
- Specified by:
equals
in interfaceCollection<E>
- Overrides:
equals
in classDecoratingObservable
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<E>
- Overrides:
hashCode
in classDecoratingObservable
-
toString
-
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 interfaceIObservable
- Overrides:
dispose
in classDecoratingObservable
-
addListener
- Parameters:
listenerType
- arbitrary object to identify a type of the listenerlistener
- the listener to add; notnull
-
removeListener
- Parameters:
listenerType
- arbitrary object to identify a type of the listenerlistener
- the listener to remove; notnull
-
hasListeners
protected boolean hasListeners() -
fireEvent
-
getRealm
- Returns:
- Returns the realm.
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-