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
-
-
Constructor Summary
Constructors Constructor Description DecoratingObservableCollection(IObservableCollection<E> decorated, boolean disposeDecoratedOnDispose)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E o)booleanaddAll(Collection<? extends E> c)protected voidaddListener(Object listenerType, IObservablesListener listener)voidclear()protected Objectclone()booleancontains(Object o)booleancontainsAll(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.booleanequals(Object obj)protected voidfireEvent(ObservableEvent event)ObjectgetElementType()Returns the element type of this observable collection, ornullif this observable collection is untyped.RealmgetRealm()inthashCode()protected booleanhasListeners()booleanisEmpty()Iterator<E>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)protected voidremoveListener(Object listenerType, IObservablesListener listener)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<T> T[]toArray(T[] a)StringtoString()-
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 Detail
-
DecoratingObservableCollection
public DecoratingObservableCollection(IObservableCollection<E> decorated, boolean disposeDecoratedOnDispose)
- Parameters:
decorated-disposeDecoratedOnDispose-
-
-
Method Detail
-
add
public boolean add(E o)
- Specified by:
addin interfaceCollection<E>
-
addAll
public boolean addAll(Collection<? extends E> c)
- Specified by:
addAllin interfaceCollection<E>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<E>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<E>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<E>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<E>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<E>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<E>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<E>
-
size
public int size()
- Specified by:
sizein interfaceCollection<E>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<E>
-
getElementType
public Object 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
public boolean equals(Object obj)
- Specified by:
equalsin interfaceCollection<E>- Overrides:
equalsin classDecoratingObservable
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<E>- Overrides:
hashCodein classDecoratingObservable
-
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
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)
-
getRealm
public Realm getRealm()
- Returns:
- Returns the realm.
-
clone
protected Object clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
-