public class OwnedTransientStore extends AbstractTransientStore
TransientStore
that belongs to a single EObject
owner. The ownership is checked at each method
call.manyMap, singleMap
NO_INDEX
Constructor and Description |
---|
OwnedTransientStore(EObject owner)
Constructs a new
OwnedTransientStore with the given owner . |
Modifier and Type | Method and Description |
---|---|
void |
add(InternalEObject internalObject,
EStructuralFeature feature,
int index,
Object value)
Adds the value at the index in the
content of the object's feature. |
void |
clear(InternalEObject internalObject,
EStructuralFeature feature)
Removes all values form the
content of the object's feature |
boolean |
contains(InternalEObject internalObject,
EStructuralFeature feature,
Object value)
Returns whether the
content of the object's feature contains the given value. |
Object |
get(InternalEObject internalObject,
EStructuralFeature feature,
int index)
Returns the value at the index in the
content of 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
content of the object's feature. |
int |
indexOf(InternalEObject internalObject,
EStructuralFeature feature,
Object value)
Returns the first index of the given value in the
content of the object's feature. |
boolean |
isEmpty(InternalEObject internalObject,
EStructuralFeature feature)
Returns whether the
content of 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
content of the object's feature. |
Object |
move(InternalEObject internalObject,
EStructuralFeature feature,
int targetIndex,
int sourceIndex)
Moves the value at the source index in the
content of the object's feature
to the target index. |
Object |
remove(InternalEObject internalObject,
EStructuralFeature feature,
int index)
Removes the value at the index in the
content of the object's feature. |
Object |
set(InternalEObject internalObject,
EStructuralFeature feature,
int index,
Object value)
Sets the value at the index in the
content of the object's feature. |
int |
size(InternalEObject internalObject,
EStructuralFeature feature)
Returns the number of values in the
content of the object's feature. |
Object[] |
toArray(InternalEObject internalObject,
EStructuralFeature feature)
Returns a new array of the values in the
content of the object's feature. |
<T> T[] |
toArray(InternalEObject internalObject,
EStructuralFeature feature,
T[] array)
Returns an array of the values in the
content of the object's feature. |
void |
unset(InternalEObject internalObject,
EStructuralFeature feature)
Unsets the feature of the object.
|
create, createValue
public OwnedTransientStore(EObject owner)
OwnedTransientStore
with the given owner
.owner
- the owner of this storepublic Object get(InternalEObject internalObject, EStructuralFeature feature, int index)
org.eclipse.emf.ecore.InternalEObject.EStore
content
of the object's feature.get
in interface InternalEObject.EStore
get
in class AbstractTransientStore
internalObject
- 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.EStore
content
of the object's feature.set
in interface InternalEObject.EStore
set
in class AbstractTransientStore
internalObject
- 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.EStore
isSet
in interface InternalEObject.EStore
isSet
in class AbstractTransientStore
internalObject
- 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.EStore
unset
in interface InternalEObject.EStore
unset
in class AbstractTransientStore
internalObject
- the object in question.feature
- a feature of the object.public boolean isEmpty(InternalEObject internalObject, EStructuralFeature feature)
org.eclipse.emf.ecore.InternalEObject.EStore
content
of the object's feature is empty.isEmpty
in interface InternalEObject.EStore
isEmpty
in class AbstractTransientStore
internalObject
- 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.EStore
content
of the object's feature.size
in interface InternalEObject.EStore
size
in class AbstractTransientStore
internalObject
- 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.EStore
content
of the object's feature contains the given value.contains
in interface InternalEObject.EStore
contains
in class AbstractTransientStore
internalObject
- 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.EStore
content
of the object's feature.indexOf
in interface InternalEObject.EStore
indexOf
in class AbstractTransientStore
internalObject
- 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.EStore
content
of the object's feature.lastIndexOf
in interface InternalEObject.EStore
lastIndexOf
in class AbstractTransientStore
internalObject
- 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.EStore
content
of the object's feature.add
in interface InternalEObject.EStore
add
in class AbstractTransientStore
internalObject
- 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.EStore
content
of the object's feature.remove
in interface InternalEObject.EStore
remove
in class AbstractTransientStore
internalObject
- 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.EStore
content
of the object's feature
to the target index.move
in interface InternalEObject.EStore
move
in class AbstractTransientStore
internalObject
- 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.EStore
content
of the object's featureclear
in interface InternalEObject.EStore
clear
in class AbstractTransientStore
internalObject
- the object in question.feature
- a many-valued
feature of the object.public Object[] toArray(InternalEObject internalObject, EStructuralFeature feature)
org.eclipse.emf.ecore.InternalEObject.EStore
content
of the object's feature.toArray
in interface InternalEObject.EStore
toArray
in class AbstractTransientStore
internalObject
- 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.EStore
content
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.EStore
toArray
in class AbstractTransientStore
internalObject
- 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.EStore
content
of the object's feature.hashCode
in interface InternalEObject.EStore
hashCode
in class AbstractTransientStore
internalObject
- the object in question.feature
- a many-valued
feature of the object.public InternalEObject getContainer(InternalEObject internalObject)
org.eclipse.emf.ecore.InternalEObject.EStore
container
.getContainer
in interface InternalEObject.EStore
getContainer
in class AbstractTransientStore
EObject.eContainer()
public EStructuralFeature getContainingFeature(InternalEObject internalObject)
org.eclipse.emf.ecore.InternalEObject.EStore
containing feature
.getContainingFeature
in interface InternalEObject.EStore
getContainingFeature
in class AbstractTransientStore
EObject.eContainingFeature()
Copyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.