Interface IObservableList<E>
- Type Parameters:
E
- the type of elements in this collection
- All Superinterfaces:
Collection<E>
,IObservable
,IObservableCollection<E>
,Iterable<E>
,List<E>
- All Known Subinterfaces:
ISWTObservableList<E>
,IViewerObservableList<E>
- All Known Implementing Classes:
AbstractObservableList
,ComputedList
,DecoratingObservableList
,MultiList
,ObservableList
,WritableList
A list whose changes can be tracked by list change listeners.
- Since:
- 1.0
- See Also:
- Restriction:
- This interface is not intended to be implemented by clients.
Clients should instead subclass one of the classes that
implement this interface.
Authors of extensions to the databinding framework may extend this interface and indirectly implement it, but if doing so must also extend one of the framework classes. (Use an API problem filter to suppress the resulting warning.)
Direct implementers of this interface outside of the framework will be broken in future releases when methods are added to this interface.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(int index, Collection<? extends E> c) boolean
addAll
(Collection<? extends E> c) void
addListChangeListener
(IListChangeListener<? super E> listener) Adds the given list change listener to the list of list change listeners.boolean
boolean
containsAll
(Collection<?> c) boolean
get
(int index) Returns the element type of this observable collection, ornull
if this observable collection is untyped.int
hashCode()
int
boolean
isEmpty()
iterator()
int
listIterator
(int index) move
(int oldIndex, int newIndex) Moves the element located atoldIndex
tonewIndex
.remove
(int index) boolean
boolean
removeAll
(Collection<?> c) void
removeListChangeListener
(IListChangeListener<? super E> listener) Removes the given list change listener from the list of list change listeners.boolean
retainAll
(Collection<?> c) int
size()
subList
(int fromIndex, int toIndex) Object[]
toArray()
<T> T[]
toArray
(T[] a) Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface org.eclipse.core.databinding.observable.IObservable
addChangeListener, addDisposeListener, addStaleListener, dispose, getRealm, isDisposed, isStale, removeChangeListener, removeDisposeListener, removeStaleListener
Methods inherited from interface java.util.List
add, clear, replaceAll, sort, spliterator
-
Method Details
-
addListChangeListener
Adds the given list change listener to the list of list change listeners.- Parameters:
listener
- the change listener to add; notnull
-
removeListChangeListener
Removes the given list change listener from the list of list change listeners. Has no effect if the given listener is not registered as a list change listener.- Parameters:
listener
- the change listener to remove; notnull
-
size
int size() -
isEmpty
boolean isEmpty() -
contains
-
iterator
-
toArray
Object[] toArray() -
toArray
<T> T[] toArray(T[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in interfaceList<E>
- TrackedGetter
-
addAll
-
addAll
-
removeAll
-
retainAll
-
equals
-
hashCode
int hashCode() -
get
-
set
-
move
Moves the element located atoldIndex
tonewIndex
. This method is equivalent to callingadd(newIndex, remove(oldIndex))
.Implementors should deliver list change notification for the remove and add operations in the same ListChangeEvent, as this allows
ListDiff.accept(ListDiffVisitor)
to recognize the operation as a move.- Parameters:
oldIndex
- the element's position before the move. Must be within the range0 <= oldIndex < size()
.newIndex
- the element's position after the move. Must be within the range0 <= newIndex < size()
.- Returns:
- the element that was moved.
- Throws:
IndexOutOfBoundsException
- if either argument is out of range (0 <= index < size()
).- Since:
- 1.1
- See Also:
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<E>
- TrackedGetter
-
listIterator
ListIterator<E> listIterator()- Specified by:
listIterator
in interfaceList<E>
- TrackedGetter
-
listIterator
- Specified by:
listIterator
in interfaceList<E>
- TrackedGetter
-
subList
-
getElementType
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 type of the elements or
null
if untyped
-