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

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.util.EcoreEList<E>
                              extended by org.eclipse.emf.ecore.util.EcoreEList.Generic<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>, EStructuralFeature.Setting, InternalEList<E>, InternalEList.Unsettable<E>
Direct Known Subclasses:
EcoreEList.Dynamic
Enclosing class:
EcoreEList<E>

public abstract static class EcoreEList.Generic<E>
extends EcoreEList<E>

An Ecore EList with an implementation for exhibiting the appropriate feature behaviour as well as for tracking the unset state. At least one of EcoreEList.getEStructuralFeature() or EcoreEList.getFeatureID() must be specialized since each delegates to the other and without specialization this will lead to stack overflow.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.util.EcoreEList
EcoreEList.Dynamic<E>, EcoreEList.Generic<E>, EcoreEList.UnmodifiableEList<E>
 
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>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.util.InternalEList
InternalEList.Unsettable<E>
 
Field Summary
static int HAS_INSTANCE_CLASS
           
static int HAS_MANY_INVERSE
           
static int HAS_NAVIGABLE_INVERSE
           
static int HAS_PROXIES
           
static int IS_CONTAINER
           
static int IS_CONTAINMENT
           
static int IS_ENUM
           
static int IS_EOBJECT
           
static int IS_PRIMITIVE
           
static int IS_SET
           
static int IS_UNIQUE
           
static int IS_UNSETTABLE
           
protected  int kind
           
 
Fields inherited from class org.eclipse.emf.ecore.util.EcoreEList
dataClass, owner
 
Fields inherited from class org.eclipse.emf.common.util.BasicEList
data, size
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
EcoreEList.Generic(int kind, java.lang.Class<?> dataClass, InternalEObject owner)
           
 
Method Summary
protected  boolean canContainNull()
          Returns !
protected  void didChange()
          Called to indicate that the data storage has been changed.
protected  boolean hasInstanceClass()
           
protected  boolean hasInverse()
          Returns false.
protected  boolean hasManyInverse()
           
protected  boolean hasNavigableInverse()
           
protected  boolean hasProxies()
           
protected  boolean isContainer()
           
protected  boolean isContainment()
           
protected  boolean isEObject()
           
protected  boolean isInstance(java.lang.Object object)
           
 boolean isSet()
          Returns whether the list is considered set, i.e., whether it's not empty.
protected  boolean isUnique()
          Returns whether objects are constrained to appear at most once in the list.
protected  boolean isUnsettable()
           
static int kind(EStructuralFeature eStructuralFeature)
           
 void unset()
          Unsets the value held by the feature of the object.
protected  boolean useEquals()
          Returns whether equals rather than == should be used to compare members.
static java.lang.Class<?> wrapperClassFor(java.lang.Class<?> javaClass)
           
 
Methods inherited from class org.eclipse.emf.ecore.util.EcoreEList
contains, createNotification, createNotification, dispatchNotification, get, getEObject, getEStructuralFeature, getFeature, getFeatureID, getFeatureType, getInverseEReference, getInverseFeatureClass, getInverseFeatureID, getNotifier, indexOf, inverseAdd, inverseRemove, isNotificationRequired, lastIndexOf, newData, resolve, resolve, resolve, resolveProxy, set, toArray, toArray, validate
 
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, clear, createNotification, createNotificationChain, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddUnique, doAddUnique, doClear, doMove, doRemove, doRemoveAll, doSetUnique, getFeatureID, hasShadow, move, remove, removeAll, setUnique, shadowAdd, shadowRemove, shadowSet
 
Methods inherited from class org.eclipse.emf.common.util.BasicEList
assign, basicGet, clone, data, get, grow, isEmpty, primitiveGet, setData, shrink, size
 
Methods inherited from class org.eclipse.emf.common.util.AbstractEList
add, add, addAll, addAll, didAdd, didClear, didMove, didRemove, didSet, equalObjects, equals, getDuplicates, getNonDuplicates, hashCode, iterator, listIterator, listIterator, move, remove, retainAll, set, toString
 
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, isEmpty, iterator, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList
 

Field Detail

IS_SET

public static final int IS_SET
See Also:
Constant Field Values

IS_UNSETTABLE

public static final int IS_UNSETTABLE
See Also:
Constant Field Values

HAS_INSTANCE_CLASS

public static final int HAS_INSTANCE_CLASS
See Also:
Constant Field Values

HAS_NAVIGABLE_INVERSE

public static final int HAS_NAVIGABLE_INVERSE
See Also:
Constant Field Values

HAS_MANY_INVERSE

public static final int HAS_MANY_INVERSE
See Also:
Constant Field Values

IS_CONTAINMENT

public static final int IS_CONTAINMENT
See Also:
Constant Field Values

IS_CONTAINER

public static final int IS_CONTAINER
See Also:
Constant Field Values

IS_UNIQUE

public static final int IS_UNIQUE
See Also:
Constant Field Values

IS_PRIMITIVE

public static final int IS_PRIMITIVE
See Also:
Constant Field Values

IS_ENUM

public static final int IS_ENUM
See Also:
Constant Field Values

IS_EOBJECT

public static final int IS_EOBJECT
See Also:
Constant Field Values

HAS_PROXIES

public static final int HAS_PROXIES
See Also:
Constant Field Values

kind

protected int kind
Constructor Detail

EcoreEList.Generic

public EcoreEList.Generic(int kind,
                          java.lang.Class<?> dataClass,
                          InternalEObject owner)
Method Detail

wrapperClassFor

public static java.lang.Class<?> wrapperClassFor(java.lang.Class<?> javaClass)

kind

public static int kind(EStructuralFeature eStructuralFeature)

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>
Returns:
whether equals rather than == should be used.

canContainNull

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

Overrides:
canContainNull in class NotifyingListImpl<E>
Returns:
!hasInverse.

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>
Returns:
whether objects are constrained to appear at most once in the list.

hasInverse

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

Overrides:
hasInverse in class NotifyingListImpl<E>
Returns:
false.

hasManyInverse

protected boolean hasManyInverse()
Overrides:
hasManyInverse in class EcoreEList<E>

hasNavigableInverse

protected boolean hasNavigableInverse()
Overrides:
hasNavigableInverse in class EcoreEList<E>

isEObject

protected boolean isEObject()
Overrides:
isEObject in class EcoreEList<E>

isContainment

protected boolean isContainment()
Overrides:
isContainment in class EcoreEList<E>

hasProxies

protected boolean hasProxies()
Overrides:
hasProxies in class EcoreEList<E>

hasInstanceClass

protected boolean hasInstanceClass()
Overrides:
hasInstanceClass in class EcoreEList<E>

isInstance

protected boolean isInstance(java.lang.Object object)
Overrides:
isInstance in class EcoreEList<E>

isContainer

protected boolean isContainer()

isUnsettable

protected boolean isUnsettable()

isSet

public boolean isSet()
Description copied from class: NotifyingListImpl
Returns whether the list is considered set, i.e., whether it's not empty. A derived implementation may model this state directly.

Specified by:
isSet in interface EStructuralFeature.Setting
Specified by:
isSet in interface InternalEList.Unsettable<E>
Overrides:
isSet in class EcoreEList<E>
Returns:
whether the list is considered set.
See Also:
EObject.eIsSet(org.eclipse.emf.ecore.EStructuralFeature)

unset

public void unset()
Description copied from interface: InternalEList.Unsettable
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>
Overrides:
unset in class EcoreEList<E>
See Also:
EObject.eUnset(org.eclipse.emf.ecore.EStructuralFeature)

didChange

protected void didChange()
Description copied from class: AbstractEList
Called to indicate that the data storage has been changed. This implementation does nothing; clients can use this to monitor change in the data storage.

Overrides:
didChange in class AbstractEList<E>

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