org.eclipse.emf.common.util
Class DelegatingEList.UnmodifiableEList<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by org.eclipse.emf.common.util.DelegatingEList<E>
              extended by org.eclipse.emf.common.util.DelegatingEList.UnmodifiableEList<E>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, EList<E>
Direct Known Subclasses:
DelegatingEcoreEList.UnmodifiableEList
Enclosing class:
DelegatingEList<E>

public static class DelegatingEList.UnmodifiableEList<E>
extends DelegatingEList<E>

An unmodifiable version of DelegatingEList.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.util.DelegatingEList
DelegatingEList.EIterator<E1>, DelegatingEList.EListIterator<E1>, DelegatingEList.NonResolvingEIterator<E1>, DelegatingEList.NonResolvingEListIterator<E1>, DelegatingEList.UnmodifiableEList<E>
 
Field Summary
protected  java.util.List<E> underlyingList
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
DelegatingEList.UnmodifiableEList(java.util.List<E> underlyingList)
          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.
protected  java.util.List<E> delegateList()
          Returns the list that acts as the backing store.
 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.
 
Methods inherited from class org.eclipse.emf.common.util.DelegatingEList
addAllUnique, addAllUnique, addAllUnique, addAllUnique, addUnique, addUnique, basicGet, basicIterator, basicList, basicListIterator, basicListIterator, canContainNull, contains, containsAll, delegateAdd, delegateAdd, delegateBasicList, delegateClear, delegateContains, delegateContainsAll, delegateEquals, delegateGet, delegateHashCode, delegateIndexOf, delegateIsEmpty, delegateIterator, delegateLastIndexOf, delegateListIterator, delegateMove, delegateRemove, delegateSet, delegateSize, delegateToArray, delegateToArray, delegateToString, didAdd, didChange, didClear, didMove, didRemove, didSet, doClear, equalObjects, equals, get, getDuplicates, getNonDuplicates, hashCode, indexOf, isEmpty, isUnique, lastIndexOf, resolve, setUnique, size, toArray, toArray, toString, useEquals, validate
 
Methods inherited from class java.util.AbstractList
removeRange, subList
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
subList
 

Field Detail

underlyingList

protected java.util.List<E> underlyingList
Constructor Detail

DelegatingEList.UnmodifiableEList

public DelegatingEList.UnmodifiableEList(java.util.List<E> underlyingList)
Creates an initialized instance.

Parameters:
underlyingList - the backing store list.
Method Detail

delegateList

protected java.util.List<E> delegateList()
Description copied from class: DelegatingEList
Returns the list that acts as the backing store.

Specified by:
delegateList in class DelegatingEList<E>
Returns:
the list that acts as the backing store.

set

public E set(int index,
             E object)
Throws an exception.

Specified by:
set in interface java.util.List<E>
Overrides:
set in class DelegatingEList<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:
DelegatingEList.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 DelegatingEList<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:
DelegatingEList.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 DelegatingEList<E>
object - the object to be added.
Throws:
java.lang.UnsupportedOperationException - always because it's not supported.
See Also:
DelegatingEList.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 DelegatingEList<E>
Parameters:
collection - the collection of objects to be added.
Throws:
java.lang.UnsupportedOperationException - always because it's not supported.
See Also:
DelegatingEList.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 DelegatingEList<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:
DelegatingEList.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 DelegatingEList<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 DelegatingEList<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 DelegatingEList<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 DelegatingEList<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 DelegatingEList<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 DelegatingEList<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 DelegatingEList<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.

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 DelegatingEList<E>
Returns:
the basic iterator.
See Also:
DelegatingEList.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 DelegatingEList<E>
Returns:
the basic list iterator.
See Also:
DelegatingEList.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 DelegatingEList<E>
Parameters:
index - the starting index.
Returns:
the basic list iterator.
See Also:
DelegatingEList.EListIterator

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