org.eclipse.emf.ecore.resource.impl
Class ResourceSetImpl.ResourcesEList<E extends java.lang.Object & Resource>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by org.eclipse.emf.common.util.AbstractEList<E>
              extended by org.eclipse.emf.common.util.BasicEList<E>
                  extended by org.eclipse.emf.common.notify.impl.NotifyingListImpl<E>
                      extended by org.eclipse.emf.ecore.util.NotifyingInternalEListImpl<E>
                          extended by org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.ResourcesEList<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, NotifyingList<E>, EList<E>, InternalEList<E>
Enclosing class:
ResourceSetImpl

protected class ResourceSetImpl.ResourcesEList<E extends java.lang.Object & Resource>
extends NotifyingInternalEListImpl<E>
implements InternalEList<E>

A notifying list implementation for supporting ResourceSet.getResources().

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>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.util.InternalEList
InternalEList.Unsettable<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
protected ResourceSetImpl.ResourcesEList()
           
 
Method Summary
 boolean contains(java.lang.Object object)
          Returns whether the list contains the object.
 int getFeatureID()
          Returns Notification.NO_FEATURE_ID.
 java.lang.Object getNotifier()
          Returns null.
protected  boolean hasInverse()
          Returns false.
protected  NotificationChain inverseAdd(E object, NotificationChain notifications)
          Does nothing and returns the notifications.
protected  NotificationChain inverseRemove(E object, NotificationChain notifications)
          Does nothing and returns the notifications.
protected  boolean isNotificationRequired()
          Returns false.
protected  boolean isUnique()
          Returns whether objects are constrained to appear at most once in the list.
protected  java.lang.Object[] newData(int capacity)
          Returns new allocated data storage.
protected  boolean useEquals()
          Returns whether equals rather than == should be used to compare members.
 
Methods inherited from class org.eclipse.emf.ecore.util.NotifyingInternalEListImpl
basicContains, basicContainsAll, basicIndexOf, basicIterator, basicLastIndexOf, basicList, basicListIterator, basicListIterator, basicToArray, basicToArray
 
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifyingListImpl
addAllUnique, addAllUnique, addAllUnique, addAllUnique, addUnique, addUnique, basicAdd, basicRemove, basicSet, canContainNull, clear, createNotification, createNotification, createNotificationChain, dispatchNotification, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddUnique, doAddUnique, doClear, doMove, doRemove, doRemoveAll, doSetUnique, getFeature, getFeatureID, hasShadow, isSet, move, remove, removeAll, resolve, setUnique, shadowAdd, shadowRemove, shadowSet
 
Methods inherited from class org.eclipse.emf.common.util.BasicEList
assign, basicGet, clone, data, get, grow, indexOf, isEmpty, lastIndexOf, primitiveGet, setData, shrink, size, toArray, toArray
 
Methods inherited from class org.eclipse.emf.common.util.AbstractEList
add, add, addAll, addAll, didAdd, didChange, didClear, didMove, didRemove, didSet, equalObjects, equals, getDuplicates, getNonDuplicates, hashCode, iterator, listIterator, listIterator, move, remove, resolve, retainAll, set, toString, 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 org.eclipse.emf.ecore.util.InternalEList
addAllUnique, addAllUnique, addUnique, addUnique, basicAdd, basicContains, basicContainsAll, basicGet, basicIndexOf, basicIterator, basicLastIndexOf, basicList, basicListIterator, basicListIterator, basicRemove, basicToArray, basicToArray, 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, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

ResourceSetImpl.ResourcesEList

protected ResourceSetImpl.ResourcesEList()
Method Detail

isNotificationRequired

protected boolean isNotificationRequired()
Description copied from class: NotifyingListImpl
Returns false.

Overrides:
isNotificationRequired in class NotifyingListImpl<E extends java.lang.Object & Resource>
Returns:
false.

newData

protected java.lang.Object[] newData(int capacity)
Description copied from class: BasicEList
Returns new allocated data storage. Clients may override this to create typed storage. The cost of type checking via a typed array is negligible.

Overrides:
newData in class BasicEList<E extends java.lang.Object & Resource>
Returns:
new data storage.

getNotifier

public java.lang.Object getNotifier()
Description copied from class: NotifyingListImpl
Returns null.

Specified by:
getNotifier in interface NotifyingList<E extends java.lang.Object & Resource>
Overrides:
getNotifier in class NotifyingListImpl<E extends java.lang.Object & Resource>
Returns:
null.

getFeatureID

public int getFeatureID()
Description copied from class: NotifyingListImpl
Returns Notification.NO_FEATURE_ID.

Specified by:
getFeatureID in interface NotifyingList<E extends java.lang.Object & Resource>
Overrides:
getFeatureID in class NotifyingListImpl<E extends java.lang.Object & Resource>
Returns:
Notification.NO_FEATURE_ID.
See Also:
Notification.getFeatureID(java.lang.Class)

useEquals

protected boolean useEquals()
Description copied from class: AbstractEList
Returns whether equals rather than == should be used to compare members. The default is to return true but clients can optimize performance by returning false. The performance difference is highly significant.

Overrides:
useEquals in class AbstractEList<E extends java.lang.Object & Resource>
Returns:
whether equals rather than == should be used.

hasInverse

protected boolean hasInverse()
Description copied from class: NotifyingListImpl
Returns false.

Overrides:
hasInverse in class NotifyingListImpl<E extends java.lang.Object & Resource>
Returns:
false.

isUnique

protected boolean isUnique()
Description copied from class: AbstractEList
Returns whether objects are constrained to appear at most once in the list. The default is to return false, but clients can override this to ensure uniqueness of contents. The performance impact is significant: operations such as add are O(n) as a result requiring uniqueness.

Overrides:
isUnique in class AbstractEList<E extends java.lang.Object & Resource>
Returns:
whether objects are constrained to appear at most once in the list.

inverseAdd

protected NotificationChain inverseAdd(E object,
                                       NotificationChain notifications)
Description copied from class: NotifyingListImpl
Does nothing and returns the notifications. Clients can override this to update the inverse of a bidirectional relation.

Overrides:
inverseAdd in class NotifyingListImpl<E extends java.lang.Object & Resource>
Parameters:
object - the object that's been added to the list.
notifications - the chain of accumulating notifications.
Returns:
the notifications.

inverseRemove

protected NotificationChain inverseRemove(E object,
                                          NotificationChain notifications)
Description copied from class: NotifyingListImpl
Does nothing and returns the notifications. Clients can override this to update the inverse of a bidirectional relation.

Overrides:
inverseRemove in class NotifyingListImpl<E extends java.lang.Object & Resource>
Parameters:
object - the object that's been remove from the list.
notifications - the chain of accumulating notifications.
Returns:
the notifications.

contains

public boolean contains(java.lang.Object object)
Description copied from class: BasicEList
Returns whether the list contains the object. This implementation uses either equals or "==" depending on useEquals.

Specified by:
contains in interface java.util.Collection<E extends java.lang.Object & Resource>
Specified by:
contains in interface java.util.List<E extends java.lang.Object & Resource>
Overrides:
contains in class BasicEList<E extends java.lang.Object & Resource>
Parameters:
object - the object in question.
Returns:
whether the list contains the object.
See Also:
AbstractEList.useEquals()

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