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 boolean
add(E o)
boolean
addAll(Collection<? extends E> c)
protected void
addListener(Object listenerType, IObservablesListener listener)
void
clear()
protected Object
clone()
boolean
contains(Object o)
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
equals(Object obj)
protected void
fireEvent(ObservableEvent event)
Object
getElementType()
Returns the element type of this observable collection, ornull
if this observable collection is untyped.Realm
getRealm()
int
hashCode()
protected boolean
hasListeners()
boolean
isEmpty()
Iterator<E>
iterator()
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
protected void
removeListener(Object listenerType, IObservablesListener listener)
boolean
retainAll(Collection<?> c)
int
size()
Object[]
toArray()
<T> T[]
toArray(T[] a)
String
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 Detail
-
DecoratingObservableCollection
public DecoratingObservableCollection(IObservableCollection<E> decorated, boolean disposeDecoratedOnDispose)
- Parameters:
decorated
-disposeDecoratedOnDispose
-
-
-
Method Detail
-
add
public boolean add(E o)
- Specified by:
add
in interfaceCollection<E>
-
addAll
public boolean addAll(Collection<? extends E> c)
- Specified by:
addAll
in interfaceCollection<E>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<E>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<E>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<E>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<E>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<E>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<E>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<E>
-
size
public int size()
- Specified by:
size
in interfaceCollection<E>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfaceCollection<E>
-
getElementType
public Object 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
public boolean equals(Object obj)
- Specified by:
equals
in interfaceCollection<E>
- Overrides:
equals
in classDecoratingObservable
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<E>
- Overrides:
hashCode
in classDecoratingObservable
-
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
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:
clone
in classObject
- Throws:
CloneNotSupportedException
-
-