org.eclipse.emf.ecore.util
Class EcoreEList.UnmodifiableEList<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by org.eclipse.emf.common.util.BasicEList<E>
              extended by org.eclipse.emf.common.util.BasicEList.UnmodifiableEList<E>
                  extended by org.eclipse.emf.ecore.util.EcoreEList.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>, EStructuralFeature.Setting, InternalEList<E>, InternalEList.Unsettable<E>
Direct Known Subclasses:
EcoreEList.UnmodifiableEList.FastCompare
Enclosing class:
EcoreEList<E>

public static class EcoreEList.UnmodifiableEList<E>
extends BasicEList.UnmodifiableEList<E>
implements InternalEList.Unsettable<E>, EStructuralFeature.Setting

See Also:
Serialized Form

Nested Class Summary
static class EcoreEList.UnmodifiableEList.FastCompare<E>
           
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.util.BasicEList
BasicEList.BasicIndexOutOfBoundsException, BasicEList.EIterator<E1>, BasicEList.EListIterator<E1>, BasicEList.NonResolvingEIterator<E1>, BasicEList.NonResolvingEListIterator<E1>, BasicEList.UnmodifiableEList<E>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.util.InternalEList
InternalEList.Unsettable<E>
 
Field Summary
protected  EStructuralFeature eStructuralFeature
           
protected  InternalEObject owner
           
 
Fields inherited from class org.eclipse.emf.common.util.BasicEList
data, size
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
EcoreEList.UnmodifiableEList(InternalEObject owner, EStructuralFeature eStructuralFeature, int size, java.lang.Object[] data)
           
 
Method Summary
 NotificationChain basicAdd(E object, NotificationChain notifications)
          Adds the object without updating the inverse.
 boolean basicContains(java.lang.Object object)
          Returns whether the object is contained within the list of unresolved values.
 boolean basicContainsAll(java.util.Collection<?> collection)
          Returns whether each object in the collection is contained within the list of unresolved values.
 int basicIndexOf(java.lang.Object object)
          Returns the index of the object within the list of unresolved values.
 java.util.Iterator<E> basicIterator()
          Returns a read-only iterator that does not resolve objects.
 int basicLastIndexOf(java.lang.Object object)
          Returns the last index of the object within the list of unresolved values.
 java.util.List<E> basicList()
          Returns an unsafe list that provides a non-resolving view of the underlying data storage.
 java.util.ListIterator<E> basicListIterator()
          Returns a read-only list iterator that does not resolve objects.
 java.util.ListIterator<E> basicListIterator(int index)
          Returns a read-only list iterator advanced to the given index that does not resolve objects.
 NotificationChain basicRemove(java.lang.Object object, NotificationChain notifications)
          Removes the object with without updating the inverse.
 java.lang.Object[] basicToArray()
          Returns the array with unresolved values.
<T> T[]
basicToArray(T[] array)
          Returns the array with unresolved values.
 java.lang.Object get(boolean resolve)
          Returns the value held by the feature of the object; it optionally resolves the value.
 EObject getEObject()
          Returns the object holding a value.
 EStructuralFeature getEStructuralFeature()
          Returns the specific feature holding a value for the object.
 boolean isSet()
          Returns whether a value is held by the feature of the object.
 void set(java.lang.Object newValue)
          Set the value held by the feature of the object.
 void unset()
          Unsets the value held by the feature of the object.
 
Methods inherited from class org.eclipse.emf.common.util.BasicEList.UnmodifiableEList
add, add, addAll, addAll, clear, grow, iterator, listIterator, listIterator, move, move, remove, remove, removeAll, retainAll, set, shrink
 
Methods inherited from class org.eclipse.emf.common.util.BasicEList
addAllUnique, addAllUnique, addAllUnique, addAllUnique, addUnique, addUnique, assign, basicGet, canContainNull, clone, contains, containsAll, data, didAdd, didChange, didClear, didMove, didRemove, didSet, equalObjects, equals, get, getDuplicates, getNonDuplicates, hashCode, indexOf, isEmpty, isUnique, lastIndexOf, newData, resolve, setData, setUnique, size, toArray, toArray, toString, useEquals, validate
 
Methods inherited from class java.util.AbstractList
removeRange, subList
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.ecore.util.InternalEList
addAllUnique, addAllUnique, addUnique, addUnique, basicGet, setUnique
 
Methods inherited from interface org.eclipse.emf.common.util.EList
move, move
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Field Detail

owner

protected final InternalEObject owner

eStructuralFeature

protected final EStructuralFeature eStructuralFeature
Constructor Detail

EcoreEList.UnmodifiableEList

public EcoreEList.UnmodifiableEList(InternalEObject owner,
                                    EStructuralFeature eStructuralFeature,
                                    int size,
                                    java.lang.Object[] data)
Method Detail

basicList

public java.util.List<E> basicList()
Description copied from class: BasicEList
Returns an unsafe list that provides a non-resolving view of the underlying data storage.

Specified by:
basicList in interface InternalEList<E>
Overrides:
basicList in class BasicEList<E>
Returns:
an unsafe list that provides a non-resolving view of the underlying data storage.

basicIterator

public java.util.Iterator<E> basicIterator()
Description copied from class: BasicEList
Returns a read-only iterator that does not resolve objects. This implementation allocates a BasicEList.NonResolvingEIterator.

Specified by:
basicIterator in interface InternalEList<E>
Overrides:
basicIterator in class BasicEList<E>
Returns:
a read-only iterator that does not resolve objects.

basicListIterator

public java.util.ListIterator<E> basicListIterator()
Description copied from class: BasicEList
Returns a read-only list iterator that does not resolve objects. This implementation allocates a BasicEList.NonResolvingEListIterator.

Specified by:
basicListIterator in interface InternalEList<E>
Overrides:
basicListIterator in class BasicEList<E>
Returns:
a read-only list iterator that does not resolve objects.

basicListIterator

public java.util.ListIterator<E> basicListIterator(int index)
Description copied from class: BasicEList
Returns a read-only list iterator advanced to the given index that does not resolve objects. This implementation allocates a BasicEList.NonResolvingEListIterator.

Specified by:
basicListIterator in interface InternalEList<E>
Overrides:
basicListIterator in class BasicEList<E>
Parameters:
index - the starting index.
Returns:
a read-only list iterator advanced to the index.

basicContains

public boolean basicContains(java.lang.Object object)
Description copied from interface: InternalEList
Returns whether the object is contained within the list of unresolved values.

Specified by:
basicContains in interface InternalEList<E>

basicContainsAll

public boolean basicContainsAll(java.util.Collection<?> collection)
Description copied from interface: InternalEList
Returns whether each object in the collection is contained within the list of unresolved values.

Specified by:
basicContainsAll in interface InternalEList<E>

basicIndexOf

public int basicIndexOf(java.lang.Object object)
Description copied from interface: InternalEList
Returns the index of the object within the list of unresolved values.

Specified by:
basicIndexOf in interface InternalEList<E>

basicLastIndexOf

public int basicLastIndexOf(java.lang.Object object)
Description copied from interface: InternalEList
Returns the last index of the object within the list of unresolved values.

Specified by:
basicLastIndexOf in interface InternalEList<E>

basicToArray

public java.lang.Object[] basicToArray()
Description copied from interface: InternalEList
Returns the array with unresolved values.

Specified by:
basicToArray in interface InternalEList<E>

basicToArray

public <T> T[] basicToArray(T[] array)
Description copied from interface: InternalEList
Returns the array with unresolved values.

Specified by:
basicToArray in interface InternalEList<E>

getEObject

public EObject getEObject()
Description copied from interface: EStructuralFeature.Setting
Returns the object holding a value.

Specified by:
getEObject in interface EStructuralFeature.Setting
Returns:
the object holding a value.

getEStructuralFeature

public EStructuralFeature getEStructuralFeature()
Description copied from interface: EStructuralFeature.Setting
Returns the specific feature holding a value for the object.

Specified by:
getEStructuralFeature in interface EStructuralFeature.Setting
Returns:
the specific feature holding a value for the object.

get

public java.lang.Object get(boolean resolve)
Description copied from interface: EStructuralFeature.Setting
Returns the value held by the feature of the object; it optionally resolves the value.

Specified by:
get in interface EStructuralFeature.Setting
Parameters:
resolve - whether to resolve.
Returns:
the value held by the feature of the object.
See Also:
EObject.eGet(EStructuralFeature, boolean)

set

public void set(java.lang.Object newValue)
Description copied from interface: EStructuralFeature.Setting
Set the value held by the feature of the object. If the new value is this setting itself, or is modified as a side effect of modifying this setting (i.e., if it is a view on the setting), the behavior is undefined and will likely result in simply clearing the list.

Specified by:
set in interface EStructuralFeature.Setting
Parameters:
newValue - the newValue.
See Also:
EObject.eSet(EStructuralFeature, Object)

isSet

public boolean isSet()
Description copied from interface: EStructuralFeature.Setting
Returns whether a value is held by the feature of the object.

Specified by:
isSet in interface EStructuralFeature.Setting
Specified by:
isSet in interface InternalEList.Unsettable<E>
Returns:
whether a value is held by the feature of the object.
See Also:
EObject.eIsSet(EStructuralFeature)

unset

public void unset()
Description copied from interface: EStructuralFeature.Setting
Unsets the value held by the feature of the object.

Specified by:
unset in interface EStructuralFeature.Setting
Specified by:
unset in interface InternalEList.Unsettable<E>
See Also:
EObject.eUnset(EStructuralFeature)

basicRemove

public NotificationChain basicRemove(java.lang.Object object,
                                     NotificationChain notifications)
Description copied from interface: InternalEList
Removes the object with without updating the inverse.

Specified by:
basicRemove in interface InternalEList<E>

basicAdd

public NotificationChain basicAdd(E object,
                                  NotificationChain notifications)
Description copied from interface: InternalEList
Adds the object without updating the inverse.

Specified by:
basicAdd in interface InternalEList<E>

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