org.eclipse.emf.ecore
Interface InternalEObject.EStore

All Known Implementing Classes:
EStoreEObjectImpl.EStoreImpl
Enclosing interface:
InternalEObject

public static interface InternalEObject.EStore

An external backing store to which an object may delegate all access.


Field Summary
static int NO_INDEX
          A value indicating that no index is specified.
 
Method Summary
 void add(InternalEObject object, EStructuralFeature feature, int index, Object value)
          Adds the value at the index in the content of the object's feature.
 void clear(InternalEObject object, EStructuralFeature feature)
          Removes all values form the content of the object's feature
 boolean contains(InternalEObject object, EStructuralFeature feature, Object value)
          Returns whether the content of the object's feature contains the given value.
 EObject create(EClass eClass)
          Creates a new instance of the class.
 Object get(InternalEObject object, EStructuralFeature feature, int index)
          Returns the value at the index in the content of the object's feature.
 InternalEObject getContainer(InternalEObject object)
          Returns the object's container.
 EStructuralFeature getContainingFeature(InternalEObject object)
          Returns the object's containing feature.
 int hashCode(InternalEObject object, EStructuralFeature feature)
          Returns the hash code of the content of the object's feature.
 int indexOf(InternalEObject object, EStructuralFeature feature, Object value)
          Returns the first index of the given value in the content of the object's feature.
 boolean isEmpty(InternalEObject object, EStructuralFeature feature)
          Returns whether the content of the object's feature is empty.
 boolean isSet(InternalEObject object, EStructuralFeature feature)
          Returns whether the object's feature is considered set.
 int lastIndexOf(InternalEObject object, EStructuralFeature feature, Object value)
          Returns the last index of the given value in the content of the object's feature.
 Object move(InternalEObject object, 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 object, EStructuralFeature feature, int index)
          Removes the value at the index in the content of the object's feature.
 Object set(InternalEObject object, EStructuralFeature feature, int index, Object value)
          Sets the value at the index in the content of the object's feature.
 int size(InternalEObject object, EStructuralFeature feature)
          Returns the number of values in the content of the object's feature.
 Object[] toArray(InternalEObject object, EStructuralFeature feature)
          Returns a new array of the values in the content of the object's feature.
 Object[] toArray(InternalEObject object, EStructuralFeature feature, Object[] array)
          Returns an array of the values in the content of the object's feature.
 void unset(InternalEObject object, EStructuralFeature feature)
          Unsets the feature of the object.
 

Field Detail

NO_INDEX

public static final int NO_INDEX
A value indicating that no index is specified. It is used in the case of accessing single-valued features where an index would be meaningless.

See Also:
Constant Field Values
Method Detail

get

public Object get(InternalEObject object,
                  EStructuralFeature feature,
                  int index)
Returns the value at the index in the content of the object's feature.

Parameters:
object - the object in question.
feature - a feature of the object.
index - an index within the content or NO_INDEX.
Returns:
the value at the index in the content of the object's feature.

set

public Object set(InternalEObject object,
                  EStructuralFeature feature,
                  int index,
                  Object value)
Sets the value at the index in the content of the object's feature.

Parameters:
object - the object in question.
feature - a feature of the object.
index - an index within the content or NO_INDEX.
value - the new value.
Returns:
the previous value.

isSet

public boolean isSet(InternalEObject object,
                     EStructuralFeature feature)
Returns whether the object's feature is considered set.

Parameters:
object - the object in question.
feature - a feature of the object.
Returns:
true if the object's feature is considered set.

unset

public void unset(InternalEObject object,
                  EStructuralFeature feature)
Unsets the feature of the object.

Parameters:
object - the object in question.
feature - a feature of the object.

isEmpty

public boolean isEmpty(InternalEObject object,
                       EStructuralFeature feature)
Returns whether the content of the object's feature is empty.

Parameters:
object - the object in question.
feature - a many-valued feature of the object.
Returns:
true if the content of the object's feature is empty.

size

public int size(InternalEObject object,
                EStructuralFeature feature)
Returns the number of values in the content of the object's feature.

Parameters:
object - the object in question.
feature - a many-valued feature of the object.
Returns:
the number of values in the content of the object's feature.

contains

public boolean contains(InternalEObject object,
                        EStructuralFeature feature,
                        Object value)
Returns whether the content of the object's feature contains the given value.

Parameters:
object - the object in question.
feature - a many-valued feature of the object.
value - the value in question.
Returns:
true if the content of the object's feature contains the given value.

indexOf

public int indexOf(InternalEObject object,
                   EStructuralFeature feature,
                   Object value)
Returns the first index of the given value in the content of the object's feature.

Parameters:
object - the object in question.
feature - a many-valued feature of the object.
value - the value in question.
Returns:
the first index of the given value in the content of the object's feature.

lastIndexOf

public int lastIndexOf(InternalEObject object,
                       EStructuralFeature feature,
                       Object value)
Returns the last index of the given value in the content of the object's feature.

Parameters:
object - the object in question.
feature - a many-valued feature of the object.
value - the value in question.
Returns:
the last index of the given value in the content of the object's feature.

add

public void add(InternalEObject object,
                EStructuralFeature feature,
                int index,
                Object value)
Adds the value at the index in the content of the object's feature.

Parameters:
object - the object in question.
feature - a many-valued feature of the object.
index - an index within the content.
value - the value to add.

remove

public Object remove(InternalEObject object,
                     EStructuralFeature feature,
                     int index)
Removes the value at the index in the content of the object's feature.

Parameters:
object - 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.
Returns:
the removed value.

move

public Object move(InternalEObject object,
                   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.

Parameters:
object - 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.
Returns:
the moved value.

clear

public void clear(InternalEObject object,
                  EStructuralFeature feature)
Removes all values form the content of the object's feature

Parameters:
object - the object in question.
feature - a many-valued feature of the object.

toArray

public Object[] toArray(InternalEObject object,
                        EStructuralFeature feature)
Returns a new array of the values in the content of the object's feature.

Parameters:
object - the object in question.
feature - a many-valued feature of the object.
Returns:
a new array of the values in the content of the object's feature.

toArray

public Object[] toArray(InternalEObject object,
                        EStructuralFeature feature,
                        Object[] array)
Returns an array of the values in the 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.

Parameters:
object - the object in question.
feature - a many-valued feature of the object.
array - the array to fill.
Returns:
an array of the values in the content of the object's feature.

hashCode

public int hashCode(InternalEObject object,
                    EStructuralFeature feature)
Returns the hash code of the content of the object's feature.

Parameters:
object - the object in question.
feature - a many-valued feature of the object.
Returns:
the hash code of the content of the object's feature.

getContainer

public InternalEObject getContainer(InternalEObject object)
Returns the object's container.

Returns:
the object's container.
See Also:
EObject.eContainer()

getContainingFeature

public EStructuralFeature getContainingFeature(InternalEObject object)
Returns the object's containing feature.

Returns:
the object's containing feature.
See Also:
EObject.eContainingFeature()

create

public EObject create(EClass eClass)
Creates a new instance of the class.

Parameters:
eClass - the class to instantiate.
Returns:
a new instance of the class.

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