## org.eclipse.emf.common.util
Class BasicEList.UnmodifiableEList<E>

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList<E>
              org.eclipse.emf.common.util.AbstractEList<E>
                  org.eclipse.emf.common.util.BasicEList<E>
                      org.eclipse.emf.common.util.BasicEList.UnmodifiableEList<E>

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, java.util.RandomAccess, EList<E>

Direct Known Subclasses:
  EcoreEList.UnmodifiableEList

Enclosing class:
  BasicEList<E>

    public static class BasicEList.UnmodifiableEList<E>

extends BasicEList<E>

An unmodifiable version of `BasicEList`.

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.emf.common.util.BasicEList
`BasicEList.BasicIndexOutOfBoundsException, BasicEList.EIterator<E1>, BasicEList.EListIterator<E1>, BasicEList.FastCompare<E>, BasicEList.NonResolvingEIterator<E1>, BasicEList.NonResolvingEListIterator<E1>, BasicEList.UnmodifiableEList<E>`

Field Summary

Fields inherited from class org.eclipse.emf.common.util.BasicEList
`data, size`

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

Constructor Summary
`BasicEList.UnmodifiableEList(int size, java.lang.Object[] data)` Creates an initialized instance.

Method Summary
`boolean` `add(E object)` Throws an exception.
`void` `add(int index, E object)` Throws an exception.
`boolean` `addAll(java.util.Collection<? extends E> collection)` Throws an exception.
`boolean` `addAll(int index, java.util.Collection<? extends E> collection)` Throws an exception.
`void` `clear()` Throws an exception.
`void` `grow(int minimumCapacity)` Throws an exception.
`java.util.Iterator<E>` `iterator()` Returns the `basic iterator`.
`java.util.ListIterator<E>` `listIterator()` Returns the `basic list iterator`.
`java.util.ListIterator<E>` `listIterator(int index)` Returns the `basic list iterator` advanced to the index.
`void` `move(int index, E object)` Throws an exception.
`E` `move(int targetIndex, int sourceIndex)` Throws an exception.
`E` `remove(int index)` Throws an exception.
`boolean` `remove(java.lang.Object object)` Throws an exception.
`boolean` `removeAll(java.util.Collection<?> collection)` Throws an exception.
`boolean` `retainAll(java.util.Collection<?> collection)` Throws an exception.
`E` `set(int index, E object)` Throws an exception.
`void` `shrink()` Throws an exception.

Methods inherited from class org.eclipse.emf.common.util.BasicEList
`addAllUnique, addAllUnique, addAllUnique, addAllUnique, addUnique, addUnique, assign, basicGet, basicList, clone, contains, data, get, indexOf, isEmpty, lastIndexOf, newData, primitiveGet, setData, setUnique, size, toArray, toArray`

Methods inherited from class org.eclipse.emf.common.util.AbstractEList
`basicIterator, basicListIterator, basicListIterator, canContainNull, didAdd, didChange, didClear, didMove, didRemove, didSet, equalObjects, equals, getDuplicates, getNonDuplicates, hashCode, isUnique, resolve, toString, useEquals, validate`

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

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

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

Methods inherited from interface java.util.List
`containsAll, subList`

Constructor Detail

### BasicEList.UnmodifiableEList

    public BasicEList.UnmodifiableEList(int size,
                                        java.lang.Object[] data)

  Creates an initialized instance.

  Parameters:
    `size` - the size of the list.
    `data` - the underlying storage of the list.

Method Detail

### set

    public E set(int index,
                 E object)

  Throws an exception.

  Specified by:
    `set` in interface `java.util.List<E>`
  Overrides:
    `set` in class `AbstractEList<E>`
  Parameters:
    `index` - the position in question.
    `object` - the object to set.
  Returns:
    the old object at the index.
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.
  See Also:
    `AbstractEList.setUnique(int, E)`

### add

    public boolean add(E object)

  Throws an exception.

  Specified by:
    `add` in interface `java.util.Collection<E>`
  Specified by:
    `add` in interface `java.util.List<E>`
  Overrides:
    `add` in class `AbstractEList<E>`
  Parameters:
    `object` - the object to be added.
  Returns:
    whether the object was added.
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.
  See Also:
    `AbstractEList.addUnique(Object)`

### add

    public void add(int index,
                    E object)

  Throws an exception.

  Specified by:
    `add` in interface `java.util.List<E>`
  Overrides:
    `add` in class `AbstractEList<E>`
    `object` - the object to be added.
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.
  See Also:
    `AbstractEList.addUnique(int, Object)`

### addAll

    public boolean addAll(java.util.Collection<? extends E> collection)

  Throws an exception.

  Specified by:
    `addAll` in interface `java.util.Collection<E>`
  Specified by:
    `addAll` in interface `java.util.List<E>`
  Overrides:
    `addAll` in class `AbstractEList<E>`
  Parameters:
    `collection` - the collection of objects to be added.
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.
  See Also:
    `AbstractEList.addAllUnique(Collection)`

### addAll

    public boolean addAll(int index,
                          java.util.Collection<? extends E> collection)

  Throws an exception.

  Specified by:
    `addAll` in interface `java.util.List<E>`
  Overrides:
    `addAll` in class `AbstractEList<E>`
  Parameters:
    `index` - the index at which to add.
    `collection` - the collection of objects to be added.
  Returns:
    whether any objects were added.
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.
  See Also:
    `AbstractEList.addAllUnique(int, Collection)`

### remove

    public boolean remove(java.lang.Object object)

  Throws an exception.

  Specified by:
    `remove` in interface `java.util.Collection<E>`
  Specified by:
    `remove` in interface `java.util.List<E>`
  Overrides:
    `remove` in class `AbstractEList<E>`
  Parameters:
    `object` - the object to be removed.
  Returns:
    whether the object was actually contained by the list.
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.

### remove

    public E remove(int index)

  Throws an exception.

  Specified by:
    `remove` in interface `java.util.List<E>`
  Overrides:
    `remove` in class `BasicEList<E>`
  Parameters:
    `index` - the position of the object to remove.
  Returns:
    the removed object.
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.

### removeAll

    public boolean removeAll(java.util.Collection<?> collection)

  Throws an exception.

  Specified by:
    `removeAll` in interface `java.util.Collection<E>`
  Specified by:
    `removeAll` in interface `java.util.List<E>`
  Overrides:
    `removeAll` in class `AbstractEList<E>`
  Parameters:
    `collection` - the collection of objects to be removed.
  Returns:
    whether any object was actually contained by the list.
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.

### retainAll

    public boolean retainAll(java.util.Collection<?> collection)

  Throws an exception.

  Specified by:
    `retainAll` in interface `java.util.Collection<E>`
  Specified by:
    `retainAll` in interface `java.util.List<E>`
  Overrides:
    `retainAll` in class `AbstractEList<E>`
  Parameters:
    `collection` - the collection of objects to be retained.
  Returns:
    whether any object was actually removed.
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.

### clear

    public void clear()

  Throws an exception.

  Specified by:
    `clear` in interface `java.util.Collection<E>`
  Specified by:
    `clear` in interface `java.util.List<E>`
  Overrides:
    `clear` in class `BasicEList<E>`
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.

### move

    public void move(int index,
                     E object)

  Throws an exception.

  Specified by:
    `move` in interface `EList<E>`
  Overrides:
    `move` in class `AbstractEList<E>`
  Parameters:
    `index` - the new position for the object in the list.
    `object` - the object to be moved.
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.

### move

    public E move(int targetIndex,
                  int sourceIndex)

  Throws an exception.

  Specified by:
    `move` in interface `EList<E>`
  Overrides:
    `move` in class `BasicEList<E>`
  Parameters:
    `targetIndex` - the new position for the object in the list.
    `sourceIndex` - the old position of the object in the list.
  Returns:
    the moved object.
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.

### shrink

    public void shrink()

  Throws an exception.

  Overrides:
    `shrink` in class `BasicEList<E>`
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.
  See Also:
    `BasicEList.grow(int)`

### grow

    public void grow(int minimumCapacity)

  Throws an exception.

  Overrides:
    `grow` in class `BasicEList<E>`
  Throws:
    `java.lang.UnsupportedOperationException` - always because it's not supported.
  See Also:
    `BasicEList.shrink()`

### iterator

    public java.util.Iterator<E> iterator()

  Returns the `basic iterator`.

  Specified by:
    `iterator` in interface `java.lang.Iterable<E>`
  Specified by:
    `iterator` in interface `java.util.Collection<E>`
  Specified by:
    `iterator` in interface `java.util.List<E>`
  Overrides:
    `iterator` in class `AbstractEList<E>`
  Returns:
    the basic iterator.
  See Also:
    `AbstractEList.EIterator`

### listIterator

    public java.util.ListIterator<E> listIterator()

  Returns the `basic list iterator`.

  Specified by:
    `listIterator` in interface `java.util.List<E>`
  Overrides:
    `listIterator` in class `AbstractEList<E>`
  Returns:
    the basic list iterator.
  See Also:
    `AbstractEList.EListIterator`

### listIterator

    public java.util.ListIterator<E> listIterator(int index)

  Returns the `basic list iterator` advanced to the index.

  Specified by:
    `listIterator` in interface `java.util.List<E>`
  Overrides:
    `listIterator` in class `AbstractEList<E>`
  Parameters:
    `index` - the starting index.
  Returns:
    the basic list iterator.
  See Also:
    `AbstractEList.EListIterator`

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.