org.eclipse.core.databinding.observable.list
Interface IObservableList
-
All Superinterfaces:
-
Collection,
IObservable,
IObservableCollection,
Iterable,
List
-
All Known Subinterfaces:
-
ISWTObservableList,
IViewerObservableList
-
All Known Implementing Classes:
-
AbstractObservableList,
ComputedList,
DecoratingObservableList,
MultiList,
ObservableList,
WritableList
-
public interface IObservableList
- extends
List,
IObservableCollection
A list whose changes can be tracked by list change listeners.
-
Since:
- 1.0
-
See Also:
-
AbstractObservableList
,
ObservableList
-
Restriction:
- This interface is not intended to be implemented by clients.
Clients should instead subclass one of the framework classes
that implement this interface. Note that direct implementers of
this interface outside of the framework will be broken in future
releases when methods are added to this interface.
addListChangeListener
void addListChangeListener(
IListChangeListener listener)
- Adds the given list change listener to the list of list change listeners.
-
-
-
Parameters:
-
listener
-
removeListChangeListener
void removeListChangeListener(
IListChangeListener listener)
- 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
-
size
int size()
-
-
Specified by:
-
size
in interface
Collection
-
Specified by:
-
size
in interface
List
-
-
"TrackedGetter"
-
isEmpty
boolean isEmpty()
-
-
Specified by:
-
isEmpty
in interface
Collection
-
Specified by:
-
isEmpty
in interface
List
-
-
"TrackedGetter"
-
contains
boolean contains(
Object o)
-
-
Specified by:
-
contains
in interface
Collection
-
Specified by:
-
contains
in interface
List
-
-
"TrackedGetter"
-
iterator
Iterator iterator()
-
-
Specified by:
-
iterator
in interface
Collection
-
Specified by:
-
iterator
in interface
Iterable
-
Specified by:
-
iterator
in interface
List
-
-
"TrackedGetter"
-
toArray
Object[] toArray()
-
-
Specified by:
-
toArray
in interface
Collection
-
Specified by:
-
toArray
in interface
List
-
-
"TrackedGetter"
-
toArray
Object[] toArray(
Object[] a)
-
-
Specified by:
-
toArray
in interface
Collection
-
Specified by:
-
toArray
in interface
List
-
-
"TrackedGetter"
-
add
boolean add(
Object o)
-
-
Specified by:
-
add
in interface
Collection
-
Specified by:
-
add
in interface
List
-
remove
boolean remove(
Object o)
-
-
Specified by:
-
remove
in interface
Collection
-
Specified by:
-
remove
in interface
List
-
containsAll
boolean containsAll(
Collection c)
-
-
Specified by:
-
containsAll
in interface
Collection
-
Specified by:
-
containsAll
in interface
List
-
-
"TrackedGetter"
-
addAll
boolean addAll(
Collection c)
-
-
Specified by:
-
addAll
in interface
Collection
-
Specified by:
-
addAll
in interface
List
-
addAll
boolean addAll(int index,
Collection c)
-
-
Specified by:
-
addAll
in interface
List
-
removeAll
boolean removeAll(
Collection c)
-
-
Specified by:
-
removeAll
in interface
Collection
-
Specified by:
-
removeAll
in interface
List
-
retainAll
boolean retainAll(
Collection c)
-
-
Specified by:
-
retainAll
in interface
Collection
-
Specified by:
-
retainAll
in interface
List
-
equals
boolean equals(
Object o)
-
-
Specified by:
-
equals
in interface
Collection
-
Specified by:
-
equals
in interface
List
-
Overrides:
-
equals
in class
Object
-
-
"TrackedGetter"
-
hashCode
int hashCode()
-
-
Specified by:
-
hashCode
in interface
Collection
-
Specified by:
-
hashCode
in interface
List
-
Overrides:
-
hashCode
in class
Object
-
-
"TrackedGetter"
-
get
Object get(int index)
-
-
Specified by:
-
get
in interface
List
-
-
"TrackedGetter"
-
set
Object set(int index,
Object element)
-
-
Specified by:
-
set
in interface
List
-
move
Object move(int oldIndex,
int newIndex)
- Moves the element located at
oldIndex
to
newIndex
. This method is equivalent to calling
add(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
range 0 <= oldIndex < size()
. -
newIndex
- the element's position after the move. Must be within the
range 0 <= 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:
-
ListDiffVisitor.handleMove(int, int, Object)
,
ListDiff.accept(ListDiffVisitor)
remove
Object remove(int index)
-
-
Specified by:
-
remove
in interface
List
-
indexOf
int indexOf(
Object o)
-
-
Specified by:
-
indexOf
in interface
List
-
-
"TrackedGetter"
-
lastIndexOf
int lastIndexOf(
Object o)
-
-
Specified by:
-
lastIndexOf
in interface
List
-
-
"TrackedGetter"
-
listIterator
ListIterator listIterator()
-
-
Specified by:
-
listIterator
in interface
List
-
-
"TrackedGetter"
-
listIterator
ListIterator listIterator(int index)
-
-
Specified by:
-
listIterator
in interface
List
-
-
"TrackedGetter"
-
subList
List subList(int fromIndex,
int toIndex)
-
-
Specified by:
-
subList
in interface
List
-
-
"TrackedGetter"
-
getElementType
Object getElementType()
-
Description copied from interface:
IObservableCollection
- Returns the element type of this observable collection, or
null
if this observable collection is untyped.
-
-
Specified by:
-
getElementType
in interface
IObservableCollection
-
-
Returns:
- the type of the elements or
null
if untyped
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.