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
ConstructorsConstructorDescriptionDecoratingObservableCollection(IObservableCollection<E> decorated, boolean disposeDecoratedOnDispose) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> c) protected voidaddListener(Object listenerType, IObservablesListener listener) voidclear()protected Objectclone()booleanbooleancontainsAll(Collection<?> c) voiddispose()Disposes of this observable object, removing all listeners registered with this object, and all listeners this object might have registered on other objects.booleanprotected voidfireEvent(ObservableEvent event) Returns the element type of this observable collection, ornullif this observable collection is untyped.getRealm()inthashCode()protected booleanbooleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) protected voidremoveListener(Object listenerType, IObservablesListener listener) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class org.eclipse.core.databinding.observable.DecoratingObservable
firstListenerAdded, getDecorated, getterCalled, handleStaleEvent, isStale, lastListenerRemovedMethods inherited from class org.eclipse.core.databinding.observable.AbstractObservable
addChangeListener, addDisposeListener, addStaleListener, checkRealm, fireChange, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListenerMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArrayMethods 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:
addin interfaceCollection<E>
-
addAll
- Specified by:
addAllin interfaceCollection<E>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<E>
-
contains
- Specified by:
containsin interfaceCollection<E>
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<E>
-
iterator
-
remove
- Specified by:
removein interfaceCollection<E>
-
removeAll
- Specified by:
removeAllin interfaceCollection<E>
-
retainAll
- Specified by:
retainAllin interfaceCollection<E>
-
size
public int size()- Specified by:
sizein interfaceCollection<E>
-
toArray
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<E>
-
getElementType
Description copied from interface:IObservableCollectionReturns the element type of this observable collection, ornullif this observable collection is untyped.- Specified by:
getElementTypein interfaceIObservableCollection<E>- Returns:
- the element type of this observable collection, or
nullif this observable collection is untyped.
-
equals
- Specified by:
equalsin interfaceCollection<E>- Overrides:
equalsin classDecoratingObservable
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<E>- Overrides:
hashCodein classDecoratingObservable
-
toString
-
dispose
public void dispose()Description copied from interface:IObservableDisposes of this observable object, removing all listeners registered with this object, and all listeners this object might have registered on other objects.- Specified by:
disposein interfaceIObservable- Overrides:
disposein 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:
clonein classObject- Throws:
CloneNotSupportedException
-