org.eclipse.emf.ecore.util
Class EcoreEMap

java.lang.Object
  extended byorg.eclipse.emf.common.util.BasicEMap
      extended byorg.eclipse.emf.ecore.util.EcoreEMap
All Implemented Interfaces:
Cloneable, Collection, EList, EMap, EStructuralFeature.Setting, InternalEList, InternalEList.Unsettable, List, Serializable
Direct Known Subclasses:
EcoreEMap.Unsettable

public class EcoreEMap
extends BasicEMap
implements InternalEList.Unsettable, EStructuralFeature.Setting

See Also:
Serialized Form

Nested Class Summary
protected  class EcoreEMap.DelegateEObjectContainmentEList
           
static class EcoreEMap.Unsettable
           
 
Nested classes inherited from class org.eclipse.emf.common.util.BasicEMap
BasicEMap.BasicEMapIterator, BasicEMap.BasicEMapKeyIterator, BasicEMap.BasicEMapValueIterator, BasicEMap.DelegatingMap, BasicEMap.Entry, BasicEMap.EntryImpl, BasicEMap.View
 
Nested classes inherited from class org.eclipse.emf.common.util.EMap
EMap.InternalMapView
 
Field Summary
protected  Class entryClass
           
protected  EClass entryEClass
           
 
Fields inherited from class org.eclipse.emf.common.util.BasicEMap
delegateEList, entryData, modCount, size, view
 
Constructor Summary
EcoreEMap(EClass entryEClass, Class entryClass, EList delegateEList)
           
EcoreEMap(EClass entryEClass, Class entryClass, InternalEObject owner, int featureID)
           
 
Method Summary
 void addUnique(int index, Object object)
          Add the object without verifying uniqueness.
 void addUnique(Object object)
          Add the object without verifying uniqueness.
 NotificationChain basicAdd(Object object, NotificationChain notifications)
          Add the object without updating the inverse.
 Object basicGet(int index)
          Returns the unresolved value.
 Iterator basicIterator()
          Returns an iterator that yields unresolved values.
 List basicList()
          Returns an unmodifiable list that yields unresolved values.
 ListIterator basicListIterator()
          Returns a list iterator that yields unresolved values.
 ListIterator basicListIterator(int index)
          Returns a list iterator that yields unresolved values.
 NotificationChain basicRemove(Object object, NotificationChain notifications)
          Remove the object with without updating the inverse.
 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.
protected  void initializeDelegateEList()
          Initializes the BasicEMap.delegateEList.
 boolean isSet()
          Returns whether a value is held by the feature of the object.
protected  BasicEMap.Entry newEntry(int hash, Object key, Object value)
          Returns a new entry.
protected  BasicEList newList()
          Returns a new allocated list of entries.
 void set(Object value)
          Set the value held by the feature of the object.
 Object setUnique(int index, Object object)
          Set the object without verifying uniqueness.
 void unset()
          Unsets the value held by the feature of the object.
 
Methods inherited from class org.eclipse.emf.common.util.BasicEMap
add, add, addAll, addAll, clear, clone, contains, containsAll, containsKey, containsValue, didAdd, didClear, didModify, didRemove, doClear, doMove, doPut, doRemove, ensureEntryDataExists, entryForKey, entryIndexForKey, entrySet, equals, get, get, grow, hashCode, hashOf, indexOf, indexOf, indexOfKey, isEmpty, iterator, keySet, lastIndexOf, listIterator, listIterator, map, move, move, newEntryData, put, putAll, putAll, putEntry, remove, remove, removeAll, removeEntry, removeKey, resolve, retainAll, set, size, subList, toArray, toArray, toString, useEqualsForKey, useEqualsForValue, validateKey, validateValue, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
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

entryEClass

protected EClass entryEClass

entryClass

protected Class entryClass
Constructor Detail

EcoreEMap

public EcoreEMap(EClass entryEClass,
                 Class entryClass,
                 InternalEObject owner,
                 int featureID)

EcoreEMap

public EcoreEMap(EClass entryEClass,
                 Class entryClass,
                 EList delegateEList)
Method Detail

initializeDelegateEList

protected void initializeDelegateEList()
Description copied from class: BasicEMap
Initializes the BasicEMap.delegateEList. This implementation illustrates the precise pattern that is used to delegate a list implementation's callback methods to the map implementation.

Overrides:
initializeDelegateEList in class BasicEMap

newList

protected BasicEList newList()
Description copied from class: BasicEMap
Returns a new allocated list of entries. Clients may override this to create typed storage. The cost of type checking via a typed array is negligable. The type must be kept in synch with newEntry.

Overrides:
newList in class BasicEMap
Returns:
a new list of entries.
See Also:
BasicEMap.newEntry(int, Object, Object)

newEntry

protected BasicEMap.Entry newEntry(int hash,
                                   Object key,
                                   Object value)
Description copied from class: BasicEMap
Returns a new entry. The key is validated and the value is validated. Clients may override this to create typed storage. The type must be kept in synch with newEntry.

Overrides:
newEntry in class BasicEMap
Parameters:
hash - the cached hash code of the key.
key - the key.
value - the value.
Returns:
a new entry.
See Also:
BasicEMap.newList()

basicGet

public Object basicGet(int index)
Description copied from interface: InternalEList
Returns the unresolved value.

Specified by:
basicGet in interface InternalEList

basicList

public List basicList()
Description copied from interface: InternalEList
Returns an unmodifiable list that yields unresolved values.

Specified by:
basicList in interface InternalEList

basicIterator

public Iterator basicIterator()
Returns an iterator that yields unresolved values.

Specified by:
basicIterator in interface InternalEList

basicListIterator

public ListIterator basicListIterator()
Returns a list iterator that yields unresolved values.

Specified by:
basicListIterator in interface InternalEList

basicListIterator

public ListIterator basicListIterator(int index)
Returns a list iterator that yields unresolved values.

Specified by:
basicListIterator in interface InternalEList

basicRemove

public NotificationChain basicRemove(Object object,
                                     NotificationChain notifications)
Remove the object with without updating the inverse.

Specified by:
basicRemove in interface InternalEList

basicAdd

public NotificationChain basicAdd(Object object,
                                  NotificationChain notifications)
Add the object without updating the inverse.

Specified by:
basicAdd in interface InternalEList

addUnique

public void addUnique(Object object)
Add the object without verifying uniqueness.

Specified by:
addUnique in interface InternalEList

addUnique

public void addUnique(int index,
                      Object object)
Add the object without verifying uniqueness.

Specified by:
addUnique in interface InternalEList

setUnique

public Object setUnique(int index,
                        Object object)
Set the object without verifying uniqueness.

Specified by:
setUnique in interface InternalEList

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 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(Object value)
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:
value - the newValue.
See Also:
EObject.eSet(EStructuralFeature, Object)

isSet

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

Specified by:
isSet in interface InternalEList.Unsettable
Returns:
whether a value is held by the feature of the object.
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 InternalEList.Unsettable
See Also:
EObject.eUnset(org.eclipse.emf.ecore.EStructuralFeature)

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