Eclipse Platform Release 3.7

## org.eclipse.core.databinding.observable.list
Class MultiList

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList
              org.eclipse.core.databinding.observable.list.AbstractObservableList
                  org.eclipse.core.databinding.observable.list.MultiList

All Implemented Interfaces:
  Iterable, Collection, List, IObservable, IObservableCollection, IObservableList

    public class MultiList

extends AbstractObservableList

An observable list backed by an array of observable lists. This class supports all removal methods (including `clear()`), as well as the `set(int, Object)` method. All other mutator methods (addition methods and `move(int, int)`) throw an `UnsupportedOperationException`.

Since:
  1.2

Field Summary

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`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.

Method Summary
`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)`

Methods inherited from class org.eclipse.core.databinding.observable.list.AbstractObservableList
`addChangeListener, addDisposeListener, addListChangeListener, addStaleListener, checkRealm, containsAll, fireChange, fireListChange, fireStale, getRealm, hasListeners, isDisposed, removeChangeListener, removeDisposeListener, removeListChangeListener, removeStaleListener, size`

Methods inherited from class java.util.AbstractList
`listIterator, removeRange, subList`

Methods inherited from class java.util.AbstractCollection
`toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.eclipse.core.databinding.observable.list.IObservableList
`listIterator, subList`

Constructor Detail

### MultiList

    public MultiList(IObservableList[] lists)

  Constructs a MultiList in the default realm, and backed by the given observable lists.

  Parameters:
    `lists` - the array of observable lists backing this MultiList.

### MultiList

    public MultiList(IObservableList[] lists,
                     Object elementType)

  Constructs a MultiList in the default realm backed by the given observable lists.

  Parameters:
    `lists` - the array of observable lists backing this MultiList.
    `elementType` - element type of the constructed list.

### MultiList

    public MultiList(Realm realm,
                     IObservableList[] lists)

  Constructs a MultiList belonging to the given realm, and backed by the given observable lists.

  Parameters:
    `realm` - the observable's realm
    `lists` - the array of observable lists backing this MultiList

### MultiList

    public MultiList(Realm realm,
                     IObservableList[] lists,
                     Object elementType)

  Constructs a MultiList belonging to the given realm, and backed by the given observable lists.

  Parameters:
    `realm` - the observable's realm
    `lists` - the array of observable lists backing this MultiList
    `elementType` - element type of the constructed list.

Method Detail

### firstListenerAdded

    protected void firstListenerAdded()

  Overrides:
    `firstListenerAdded` in class `AbstractObservableList`

### lastListenerRemoved

    protected void lastListenerRemoved()

  Overrides:
    `lastListenerRemoved` in class `AbstractObservableList`

### doGetSize

    protected int doGetSize()

  Specified by:
    `doGetSize` in class `AbstractObservableList`
  Returns:
    the size

### getElementType

    public Object getElementType()

  Description copied from interface: `IObservableCollection`
  Returns the element type of this observable collection, or `null` if this observable collection is untyped.

  Returns:
    the element type of this observable collection, or `null` if this observable collection is untyped.

### add

    public boolean add(Object o)

  Specified by:
    `add` in interface `Collection`
  Specified by:
    `add` in interface `List`
  Specified by:
    `add` in interface `IObservableList`
  Overrides:
    `add` in class `AbstractObservableList`

### add

    public void add(int index,
                    Object o)

  Specified by:
    `add` in interface `List`
  Overrides:
    `add` in class `AbstractList`

### addAll

    public boolean addAll(Collection c)

  Specified by:
    `addAll` in interface `Collection`
  Specified by:
    `addAll` in interface `List`
  Specified by:
    `addAll` in interface `IObservableList`
  Overrides:
    `addAll` in class `AbstractObservableList`

### addAll

    public boolean addAll(int index,
                          Collection c)

  Specified by:
    `addAll` in interface `List`
  Specified by:
    `addAll` in interface `IObservableList`
  Overrides:
    `addAll` in class `AbstractObservableList`

### clear

    public void clear()

  Specified by:
    `clear` in interface `Collection`
  Specified by:
    `clear` in interface `List`
  Overrides:
    `clear` in class `AbstractList`

### get

    public Object get(int index)

  Specified by:
    `get` in interface `List`
  Specified by:
    `get` in interface `IObservableList`
  Specified by:
    `get` in class `AbstractList`

### contains

    public boolean contains(Object o)

  Specified by:
    `contains` in interface `Collection`
  Specified by:
    `contains` in interface `List`
  Specified by:
    `contains` in interface `IObservableList`
  Overrides:
    `contains` in class `AbstractObservableList`

### equals

    public boolean equals(Object o)

  Specified by:
    `equals` in interface `Collection`
  Specified by:
    `equals` in interface `List`
  Specified by:
    `equals` in interface `IObservableList`
  Overrides:
    `equals` in class `AbstractObservableList`

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `Collection`
  Specified by:
    `hashCode` in interface `List`
  Specified by:
    `hashCode` in interface `IObservableList`
  Overrides:
    `hashCode` in class `AbstractObservableList`

### indexOf

    public int indexOf(Object o)

  Specified by:
    `indexOf` in interface `List`
  Specified by:
    `indexOf` in interface `IObservableList`
  Overrides:
    `indexOf` in class `AbstractObservableList`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `Collection`
  Specified by:
    `isEmpty` in interface `List`
  Specified by:
    `isEmpty` in interface `IObservableList`
  Overrides:
    `isEmpty` in class `AbstractObservableList`

### iterator

    public Iterator iterator()

  Specified by:
    `iterator` in interface `Iterable`
  Specified by:
    `iterator` in interface `Collection`
  Specified by:
    `iterator` in interface `List`
  Specified by:
    `iterator` in interface `IObservableList`
  Overrides:
    `iterator` in class `AbstractObservableList`

### lastIndexOf

    public int lastIndexOf(Object o)

  Specified by:
    `lastIndexOf` in interface `List`
  Specified by:
    `lastIndexOf` in interface `IObservableList`
  Overrides:
    `lastIndexOf` in class `AbstractObservableList`

### listIterator

    public ListIterator listIterator(int index)

  Specified by:
    `listIterator` in interface `List`
  Specified by:
    `listIterator` in interface `IObservableList`
  Overrides:
    `listIterator` in class `AbstractList`

### move

    public Object move(int oldIndex,
                       int newIndex)

  Description copied from class: `AbstractObservableList`
  Moves the element located at `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.

  Specified by:
    `move` in interface `IObservableList`
  Overrides:
    `move` in class `AbstractObservableList`
  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.
  See Also:
    `ListDiffVisitor.handleMove(int, int, Object)`, `ListDiff.accept(ListDiffVisitor)`

### remove

    public boolean remove(Object o)

  Specified by:
    `remove` in interface `Collection`
  Specified by:
    `remove` in interface `List`
  Specified by:
    `remove` in interface `IObservableList`
  Overrides:
    `remove` in class `AbstractObservableList`

### remove

    public Object remove(int index)

  Specified by:
    `remove` in interface `List`
  Specified by:
    `remove` in interface `IObservableList`
  Overrides:
    `remove` in class `AbstractList`

### removeAll

    public boolean removeAll(Collection c)

  Specified by:
    `removeAll` in interface `Collection`
  Specified by:
    `removeAll` in interface `List`
  Specified by:
    `removeAll` in interface `IObservableList`
  Overrides:
    `removeAll` in class `AbstractObservableList`

### retainAll

    public boolean retainAll(Collection c)

  Specified by:
    `retainAll` in interface `Collection`
  Specified by:
    `retainAll` in interface `List`
  Specified by:
    `retainAll` in interface `IObservableList`
  Overrides:
    `retainAll` in class `AbstractObservableList`

### set

    public Object set(int index,
                      Object o)

  Specified by:
    `set` in interface `List`
  Specified by:
    `set` in interface `IObservableList`
  Overrides:
    `set` in class `AbstractList`

### toArray

    public Object[] toArray()

  Specified by:
    `toArray` in interface `Collection`
  Specified by:
    `toArray` in interface `List`
  Specified by:
    `toArray` in interface `IObservableList`
  Overrides:
    `toArray` in class `AbstractObservableList`

### toArray

    public Object[] toArray(Object[] a)

  Specified by:
    `toArray` in interface `Collection`
  Specified by:
    `toArray` in interface `List`
  Specified by:
    `toArray` in interface `IObservableList`
  Overrides:
    `toArray` in class `AbstractObservableList`

### isStale

    public boolean isStale()

  Description copied from interface: `IObservable`
  Returns whether the state of this observable is stale and is expected to change soon. A non-stale observable that becomes stale will notify its stale listeners. A stale object that becomes non-stale does so by changing its state and notifying its change listeners, it does not notify its stale listeners about becoming non-stale. Clients that do not expect asynchronous changes may ignore staleness of observable objects.

  Specified by:
    `isStale` in interface `IObservable`
  Overrides:
    `isStale` in class `AbstractObservableList`
  Returns:
    true if this observable's state is stale and will change soon.

### 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 interface `IObservable`
  Overrides:
    `dispose` in class `AbstractObservableList`

Eclipse Platform Release 3.7

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.