|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.edit.provider.ItemProviderAdapter.ChildrenStore
A ChildrenStore
stores a number of objects that are to be presented as the children of an object.
Each of a set of feature
s may have either one or any number
of children objects associated with it, depending on its multiplicity. The objects associated with a
multiplicity-many feature are accessed and manipulated as an EList
,
typically mirroring the actual values of that feature, with some or all in wrappers, as necessary. The object
associated with a multiplicity-1 feature is typically accessed and set directly, although a modifiable, singleton
list view is available. This class provides a number of convenient methods for access by feature, as well as
a method, getChildren
that returns the complete collection of children from all features as
an unmodifiable list.
Nested Class Summary | |
protected static class |
ItemProviderAdapter.ChildrenStore.Entry
An Entry represents the children from a feature. |
Field Summary | |
protected ItemProviderAdapter.ChildrenStore.Entry[] |
entries
|
Constructor Summary | |
ItemProviderAdapter.ChildrenStore(Collection features)
Creates a store for the children of the given features. |
Method Summary | |
void |
clear()
Clears the children of all features in the store. |
boolean |
contains(EStructuralFeature feature)
Returns whether the store handles children of the specified feature. |
protected EList |
createList(EStructuralFeature feature)
Returns a list, either a full list implementation or a fixed-sized modifiable singleton list, depending on the multiplicity of the feature. |
Object |
get(EStructuralFeature feature,
int index)
Returns either a single element of the specified feature or, if index is -1, the value view. |
List |
getChildren()
Returns a list containing all children of all features in the store. |
protected ItemProviderAdapter.ChildrenStore.Entry |
getEntry(EStructuralFeature feature)
|
EList |
getList(EStructuralFeature feature)
Returns the list view of the specified feature, or null if the store does not handle the feature. |
int |
getOffset(EStructuralFeature feature)
Returns the offset in the list returned by getChildren of given feature's children. |
Object |
getValue(EStructuralFeature feature)
Returns the value view of the specified feature. |
boolean |
set(EStructuralFeature feature,
int index,
Object object)
Sets either a single element of the specified feature or, if the index is -1, the value of the feature. |
boolean |
setValue(EStructuralFeature feature,
Object value)
Sets the value of the specified feature. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ItemProviderAdapter.ChildrenStore.Entry[] entries
Constructor Detail |
public ItemProviderAdapter.ChildrenStore(Collection features)
Method Detail |
protected ItemProviderAdapter.ChildrenStore.Entry getEntry(EStructuralFeature feature)
protected EList createList(EStructuralFeature feature)
public boolean contains(EStructuralFeature feature)
public EList getList(EStructuralFeature feature)
public Object getValue(EStructuralFeature feature)
public boolean setValue(EStructuralFeature feature, Object value)
Collection
, and all of its elements are added to the emptied list.
public Object get(EStructuralFeature feature, int index)
public boolean set(EStructuralFeature feature, int index, Object object)
public List getChildren()
public int getOffset(EStructuralFeature feature)
getChildren
of given feature's children.
public void clear()
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |