public abstract class AbstractTransientStore extends Object implements TransientStore
TransientStore that uses collections to store data in memory.| Modifier and Type | Field and Description | 
|---|---|
| protected Map<FeatureKey,List<Object>> | manyMapMap that holds loaded multi-valued features. | 
| protected Map<FeatureKey,Object> | singleMapMap that holds loaded single-valued features. | 
NO_INDEX| Constructor and Description | 
|---|
| AbstractTransientStore()Constructs a new  AbstractTransientStore. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(InternalEObject internalObject,
   EStructuralFeature feature,
   int index,
   Object value)Adds the value at the index in the  contentof the object's feature. | 
| void | clear(InternalEObject internalObject,
     EStructuralFeature feature)Removes all values form the  contentof the object's feature | 
| boolean | contains(InternalEObject internalObject,
        EStructuralFeature feature,
        Object value)Returns whether the  contentof the object's feature contains the given value. | 
| EObject | create(EClass eClass)Creates a new instance of the class. | 
| protected List<Object> | createValue()Creates a new value that will be stored in the  manyMap. | 
| Object | get(InternalEObject internalObject,
   EStructuralFeature feature,
   int index)Returns the value at the index in the  contentof the object's feature. | 
| InternalEObject | getContainer(InternalEObject internalObject)Returns the object's  container. | 
| EStructuralFeature | getContainingFeature(InternalEObject internalObject)Returns the object's  containing feature. | 
| int | hashCode(InternalEObject internalObject,
        EStructuralFeature feature)Returns the hash code of the  contentof the object's feature. | 
| int | indexOf(InternalEObject internalObject,
       EStructuralFeature feature,
       Object value)Returns the first index of the given value in the  contentof the object's feature. | 
| boolean | isEmpty(InternalEObject internalObject,
       EStructuralFeature feature)Returns whether the  contentof the object's feature is empty. | 
| boolean | isSet(InternalEObject internalObject,
     EStructuralFeature feature)Returns whether the object's feature is considered set. | 
| int | lastIndexOf(InternalEObject internalObject,
           EStructuralFeature feature,
           Object value)Returns the last index of the given value in the  contentof the object's feature. | 
| Object | move(InternalEObject internalObject,
    EStructuralFeature feature,
    int targetIndex,
    int sourceIndex)Moves the value at the source index in the  contentof the object's feature
 to the target index. | 
| Object | remove(InternalEObject internalObject,
      EStructuralFeature feature,
      int index)Removes the value at the index in the  contentof the object's feature. | 
| Object | set(InternalEObject internalObject,
   EStructuralFeature feature,
   int index,
   Object value)Sets the value at the index in the  contentof the object's feature. | 
| int | size(InternalEObject internalObject,
    EStructuralFeature feature)Returns the number of values in the  contentof the object's feature. | 
| Object[] | toArray(InternalEObject internalObject,
       EStructuralFeature feature)Returns a new array of the values in the  contentof the object's feature. | 
| <T> T[] | toArray(InternalEObject internalObject,
       EStructuralFeature feature,
       T[] array)Returns an array of the values in the  contentof the object's feature. | 
| void | unset(InternalEObject internalObject,
     EStructuralFeature feature)Unsets the feature of the object. | 
protected Map<FeatureKey,Object> singleMap
protected Map<FeatureKey,List<Object>> manyMap
public AbstractTransientStore()
AbstractTransientStore.public Object get(InternalEObject internalObject, EStructuralFeature feature, int index)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature.get in interface InternalEObject.EStoreinternalObject - the object in question.feature - a feature of the object.index - an index within the content or InternalEObject.EStore.NO_INDEX.public Object set(InternalEObject internalObject, EStructuralFeature feature, int index, Object value)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature.set in interface InternalEObject.EStoreinternalObject - the object in question.feature - a feature of the object.index - an index within the content or InternalEObject.EStore.NO_INDEX.value - the new value.public boolean isSet(InternalEObject internalObject, EStructuralFeature feature)
org.eclipse.emf.ecore.InternalEObject.EStoreisSet in interface InternalEObject.EStoreinternalObject - the object in question.feature - a feature of the object.true if the object's feature is considered set.public void unset(InternalEObject internalObject, EStructuralFeature feature)
org.eclipse.emf.ecore.InternalEObject.EStoreunset in interface InternalEObject.EStoreinternalObject - the object in question.feature - a feature of the object.public boolean isEmpty(InternalEObject internalObject, EStructuralFeature feature)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature is empty.isEmpty in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.true if the content of the object's feature is empty.public int size(InternalEObject internalObject, EStructuralFeature feature)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature.size in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.public boolean contains(InternalEObject internalObject, EStructuralFeature feature, Object value)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature contains the given value.contains in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.value - the value in question.true if the content of the object's feature contains the given value.public int indexOf(InternalEObject internalObject, EStructuralFeature feature, Object value)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature.indexOf in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.value - the value in question.public int lastIndexOf(InternalEObject internalObject, EStructuralFeature feature, Object value)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature.lastIndexOf in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.value - the value in question.public void add(InternalEObject internalObject, EStructuralFeature feature, int index, Object value)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature.add in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.index - an index within the content.value - the value to add.public Object remove(InternalEObject internalObject, EStructuralFeature feature, int index)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature.remove in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.index - the index within the feature's content of the value to remove.public Object move(InternalEObject internalObject, EStructuralFeature feature, int targetIndex, int sourceIndex)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature
 to the target index.move in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.targetIndex - the index within the feature's content to which to move the value.sourceIndex - the index within the feature's content of the value to move.public void clear(InternalEObject internalObject, EStructuralFeature feature)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's featureclear in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.public Object[] toArray(InternalEObject internalObject, EStructuralFeature feature)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature.toArray in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.public <T> T[] toArray(InternalEObject internalObject, EStructuralFeature feature, T[] array)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature.
 The given array will be used, unless it's too small, in which case a new array of the same type is allocated instead.toArray in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.array - the array to fill.public int hashCode(InternalEObject internalObject, EStructuralFeature feature)
org.eclipse.emf.ecore.InternalEObject.EStorecontent of the object's feature.hashCode in interface InternalEObject.EStoreinternalObject - the object in question.feature - a many-valued feature of the object.public InternalEObject getContainer(InternalEObject internalObject)
org.eclipse.emf.ecore.InternalEObject.EStorecontainer.getContainer in interface InternalEObject.EStoreEObject.eContainer()public EStructuralFeature getContainingFeature(InternalEObject internalObject)
org.eclipse.emf.ecore.InternalEObject.EStorecontaining feature.getContainingFeature in interface InternalEObject.EStoreEObject.eContainingFeature()public EObject create(EClass eClass)
org.eclipse.emf.ecore.InternalEObject.EStorecreate in interface InternalEObject.EStoreeClass - the class to instantiate.Copyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.