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, java.lang.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, java.lang.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.
 java.lang.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, java.lang.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, java.lang.Object value)
          Returns the last index of the given value in the content of the object's feature.
 java.lang.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.
 java.lang.Object remove(InternalEObject object, EStructuralFeature feature, int index)
          Removes the value at the index in the content of the object's feature.
 java.lang.Object set(InternalEObject object, EStructuralFeature feature, int index, java.lang.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.
 java.lang.Object[] toArray(InternalEObject object, EStructuralFeature feature)
          Returns a new array of the values in the content of the object's feature.
<T> T[]
toArray(InternalEObject object, EStructuralFeature feature, T[] 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

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

java.lang.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

java.lang.Object set(InternalEObject object,
                     EStructuralFeature feature,
                     int index,
                     java.lang.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

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

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

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

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

boolean contains(InternalEObject object,
                 EStructuralFeature feature,
                 java.lang.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

int indexOf(InternalEObject object,
            EStructuralFeature feature,
            java.lang.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

int lastIndexOf(InternalEObject object,
                EStructuralFeature feature,
                java.lang.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

void add(InternalEObject object,
         EStructuralFeature feature,
         int index,
         java.lang.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

java.lang.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

java.lang.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

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

java.lang.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

<T> T[] toArray(InternalEObject object,
                EStructuralFeature feature,
                T[] 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

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

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

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

getContainingFeature

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

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

create

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.