E
- the type of the elements in the listpublic class MultiList<E> extends AbstractObservableList<E>
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<E>[] lists)
Deprecated.
use MultiList(List
|
MultiList(IObservableList<E>[] lists,
Object elementType)
Deprecated.
use MultiList(List
|
MultiList(List<IObservableList<E>> lists)
Constructs a MultiList in the default realm, and backed by the given
observable lists.
|
MultiList(List<IObservableList<E>> lists,
Object elementType)
Constructs a MultiList in the default realm backed by the given
observable lists.
|
MultiList(Realm realm,
IObservableList<E>[] lists)
Constructs a MultiList belonging to the given realm, and backed by the
given observable lists.
|
MultiList(Realm realm,
IObservableList<E>[] lists,
Object elementType)
Deprecated.
use MultiList(realm, List
|
MultiList(Realm realm,
List<IObservableList<E>> 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<? extends E> c) |
boolean |
addAll(int index,
Collection<? extends E> 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() |
E |
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<E> |
iterator() |
int |
lastIndexOf(Object o) |
protected void |
lastListenerRemoved() |
ListIterator<E> |
listIterator(int index) |
E |
move(int oldIndex,
int newIndex)
Moves the element located at
oldIndex to
newIndex . |
E |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
E |
set(int index,
E o) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] 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
replaceAll, sort, spliterator
parallelStream, removeIf, stream
@Deprecated public MultiList(IObservableList<E>[] lists)
lists
- the array of observable lists backing this MultiList.public MultiList(List<IObservableList<E>> lists)
lists
- the array of observable lists backing this MultiList.@Deprecated public MultiList(IObservableList<E>[] lists, Object elementType)
lists
- the array of observable lists backing this MultiList.elementType
- element type of the constructed list.public MultiList(List<IObservableList<E>> lists, Object elementType)
lists
- the array of observable lists backing this MultiList.elementType
- element type of the constructed list.public MultiList(Realm realm, IObservableList<E>[] lists)
realm
- the observable's realmlists
- the array of observable lists backing this MultiList@Deprecated public MultiList(Realm realm, IObservableList<E>[] lists, Object elementType)
realm
- the observable's realmlists
- the array of observable lists backing this MultiListelementType
- element type of the constructed list.public MultiList(Realm realm, List<IObservableList<E>> 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<E>
protected void lastListenerRemoved()
lastListenerRemoved
in class AbstractObservableList<E>
protected int doGetSize()
doGetSize
in class AbstractObservableList<E>
public Object getElementType()
IObservableCollection
null
if this observable collection is untyped.null
if untypedpublic boolean add(Object o)
add
in interface Collection<E>
add
in interface List<E>
add
in interface IObservableList<E>
add
in class AbstractObservableList<E>
public void add(int index, Object o)
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
addAll
in interface List<E>
addAll
in interface IObservableList<E>
addAll
in class AbstractObservableList<E>
public boolean addAll(int index, Collection<? extends E> c)
addAll
in interface List<E>
addAll
in interface IObservableList<E>
addAll
in class AbstractObservableList<E>
public void clear()
clear
in interface Collection<E>
clear
in interface List<E>
clear
in class AbstractList<E>
public E get(int index)
get
in interface List<E>
get
in interface IObservableList<E>
get
in class AbstractList<E>
public boolean contains(Object o)
contains
in interface Collection<E>
contains
in interface List<E>
contains
in interface IObservableList<E>
contains
in class AbstractObservableList<E>
public boolean equals(Object o)
equals
in interface Collection<E>
equals
in interface List<E>
equals
in interface IObservableList<E>
equals
in class AbstractObservableList<E>
public int hashCode()
hashCode
in interface Collection<E>
hashCode
in interface List<E>
hashCode
in interface IObservableList<E>
hashCode
in class AbstractObservableList<E>
public int indexOf(Object o)
indexOf
in interface List<E>
indexOf
in interface IObservableList<E>
indexOf
in class AbstractObservableList<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in interface List<E>
isEmpty
in interface IObservableList<E>
isEmpty
in class AbstractObservableList<E>
public Iterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in interface List<E>
iterator
in interface IObservableList<E>
iterator
in class AbstractObservableList<E>
public int lastIndexOf(Object o)
lastIndexOf
in interface List<E>
lastIndexOf
in interface IObservableList<E>
lastIndexOf
in class AbstractObservableList<E>
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E>
listIterator
in interface IObservableList<E>
listIterator
in class AbstractList<E>
public E 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<E>
move
in class AbstractObservableList<E>
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<E>
remove
in interface List<E>
remove
in interface IObservableList<E>
remove
in class AbstractObservableList<E>
public E remove(int index)
remove
in interface List<E>
remove
in interface IObservableList<E>
remove
in class AbstractList<E>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
removeAll
in interface List<E>
removeAll
in interface IObservableList<E>
removeAll
in class AbstractObservableList<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
retainAll
in interface List<E>
retainAll
in interface IObservableList<E>
retainAll
in class AbstractObservableList<E>
public E set(int index, E o)
set
in interface List<E>
set
in interface IObservableList<E>
set
in class AbstractList<E>
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in interface List<E>
toArray
in interface IObservableList<E>
toArray
in class AbstractObservableList<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
toArray
in interface List<E>
toArray
in interface IObservableList<E>
toArray
in class AbstractObservableList<E>
public boolean isStale()
IObservable
isStale
in interface IObservable
isStale
in class AbstractObservableList<E>
public void dispose()
IObservable
dispose
in interface IObservable
dispose
in class AbstractObservableList<E>
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.