public class MultiList extends AbstractObservableList
clear()
), as well as the
set(int, Object)
method. All other mutator methods (addition methods
and move(int, int)
) throw an UnsupportedOperationException
.modCount
Constructor and Description |
---|
MultiList(IObservableList[] lists)
Constructs a MultiList in the default realm, and backed by the given
observable lists.
|
MultiList(IObservableList[] lists,
Object elementType)
Constructs a MultiList in the default realm backed by the given
observable lists.
|
MultiList(Realm realm,
IObservableList[] lists)
Constructs a MultiList belonging to the given realm, and backed by the
given observable lists.
|
MultiList(Realm realm,
IObservableList[] lists,
Object elementType)
Constructs a MultiList belonging to the given realm, and backed by the
given observable lists.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Object o) |
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
boolean |
addAll(int index,
Collection c) |
void |
clear() |
boolean |
contains(Object o) |
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.
|
protected int |
doGetSize() |
boolean |
equals(Object o) |
protected void |
firstListenerAdded() |
Object |
get(int index) |
Object |
getElementType()
Returns the element type of this observable collection, or
null if this observable collection is untyped. |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
boolean |
isStale()
Returns whether the state of this observable is stale and is expected to
change soon.
|
Iterator |
iterator() |
int |
lastIndexOf(Object o) |
protected void |
lastListenerRemoved() |
ListIterator |
listIterator(int index) |
Object |
move(int oldIndex,
int newIndex)
Moves the element located at
oldIndex to
newIndex . |
Object |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
boolean |
retainAll(Collection c) |
Object |
set(int index,
Object o) |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
addChangeListener, addDisposeListener, addListChangeListener, addStaleListener, checkRealm, containsAll, fireChange, fireListChange, fireStale, getRealm, hasListeners, isDisposed, removeChangeListener, removeDisposeListener, removeListChangeListener, removeStaleListener, size
listIterator, removeRange, subList
toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
listIterator, subList
public MultiList(IObservableList[] lists)
lists
- the array of observable lists backing this MultiList.public MultiList(IObservableList[] lists, Object elementType)
lists
- the array of observable lists backing this MultiList.elementType
- element type of the constructed list.public MultiList(Realm realm, IObservableList[] lists)
realm
- the observable's realmlists
- the array of observable lists backing this MultiListpublic MultiList(Realm realm, IObservableList[] lists, Object elementType)
realm
- the observable's realmlists
- the array of observable lists backing this MultiListelementType
- element type of the constructed list.protected void firstListenerAdded()
firstListenerAdded
in class AbstractObservableList
protected void lastListenerRemoved()
lastListenerRemoved
in class AbstractObservableList
protected int doGetSize()
doGetSize
in class AbstractObservableList
public Object getElementType()
IObservableCollection
null
if this observable collection is untyped.null
if untypedpublic boolean add(Object o)
add
in interface Collection
add
in interface List
add
in interface IObservableList
add
in class AbstractObservableList
public void add(int index, Object o)
add
in interface List
add
in class AbstractList
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface List
addAll
in interface IObservableList
addAll
in class AbstractObservableList
public boolean addAll(int index, Collection c)
addAll
in interface List
addAll
in interface IObservableList
addAll
in class AbstractObservableList
public void clear()
clear
in interface Collection
clear
in interface List
clear
in class AbstractList
public Object get(int index)
get
in interface List
get
in interface IObservableList
get
in class AbstractList
public boolean contains(Object o)
contains
in interface Collection
contains
in interface List
contains
in interface IObservableList
contains
in class AbstractObservableList
public boolean equals(Object o)
equals
in interface Collection
equals
in interface List
equals
in interface IObservableList
equals
in class AbstractObservableList
public int hashCode()
hashCode
in interface Collection
hashCode
in interface List
hashCode
in interface IObservableList
hashCode
in class AbstractObservableList
public int indexOf(Object o)
indexOf
in interface List
indexOf
in interface IObservableList
indexOf
in class AbstractObservableList
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface List
isEmpty
in interface IObservableList
isEmpty
in class AbstractObservableList
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface List
iterator
in interface IObservableList
iterator
in class AbstractObservableList
public int lastIndexOf(Object o)
lastIndexOf
in interface List
lastIndexOf
in interface IObservableList
lastIndexOf
in class AbstractObservableList
public ListIterator listIterator(int index)
listIterator
in interface List
listIterator
in interface IObservableList
listIterator
in class AbstractList
public Object move(int oldIndex, int newIndex)
AbstractObservableList
oldIndex
to
newIndex
. This method is equivalent to calling
add(newIndex, remove(oldIndex))
.
Subclasses should override this method to 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.
move
in interface IObservableList
move
in class AbstractObservableList
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()
.ListDiffVisitor.handleMove(int, int, Object)
,
ListDiff.accept(ListDiffVisitor)
public boolean remove(Object o)
remove
in interface Collection
remove
in interface List
remove
in interface IObservableList
remove
in class AbstractObservableList
public Object remove(int index)
remove
in interface List
remove
in interface IObservableList
remove
in class AbstractList
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface List
removeAll
in interface IObservableList
removeAll
in class AbstractObservableList
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface List
retainAll
in interface IObservableList
retainAll
in class AbstractObservableList
public Object set(int index, Object o)
set
in interface List
set
in interface IObservableList
set
in class AbstractList
public Object[] toArray()
toArray
in interface Collection
toArray
in interface List
toArray
in interface IObservableList
toArray
in class AbstractObservableList
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface List
toArray
in interface IObservableList
toArray
in class AbstractObservableList
public boolean isStale()
IObservable
isStale
in interface IObservable
isStale
in class AbstractObservableList
public void dispose()
IObservable
dispose
in interface IObservable
dispose
in class AbstractObservableList
Copyright (c) 2000, 2013 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.