|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.edit.command.CommandParameter
public class CommandParameter
This is a convenient common base class for all the command parameters need by the various types of commands. It provides particular support for the encodings need by the basic EMF-based command implementations.
Field Summary | |
---|---|
java.util.Collection<?> |
collection
This is the collection of values involved in the command. |
java.lang.Object |
feature
This is the aspect of the owner that will be affected. |
int |
index
This the index (usually the position indicator) of the command. |
static int |
NO_INDEX
This value is used to indicate that the optional positional index indicator is unspecified. |
java.lang.Object |
owner
This is the object that is the target or subject of the command. |
java.lang.Object |
value
This is the single value involved in the command. |
Constructor Summary | |
---|---|
CommandParameter(java.lang.Object owner)
This creates an instance specifying only an owner. |
|
CommandParameter(java.lang.Object owner,
java.lang.Object feature,
java.util.Collection<?> collection)
This creates an instance specifying an owner, a feature, and a collection of values. |
|
CommandParameter(java.lang.Object owner,
java.lang.Object feature,
java.util.Collection<?> collection,
int index)
This creates an instance specifying an owner, a feature, a collection of values, and an index. |
|
CommandParameter(java.lang.Object owner,
java.lang.Object feature,
java.lang.Object value)
This creates an instance specifying an owner, a feature, and a value. |
|
CommandParameter(java.lang.Object owner,
java.lang.Object feature,
java.lang.Object value,
java.util.Collection<?> collection)
This creates an instance specifying an owner, a feature, and a value, and a collection. |
|
CommandParameter(java.lang.Object owner,
java.lang.Object feature,
java.lang.Object value,
java.util.Collection<?> collection,
int index)
This creates an instance specifying an owner, a feature, a value, a collection, and an index. |
|
CommandParameter(java.lang.Object owner,
java.lang.Object feature,
java.lang.Object value,
int index)
This creates an instance specifying an owner, a feature, a value, and an index. |
Method Summary | |
---|---|
static java.lang.String |
collectionToString(java.util.Collection<?> collection)
|
java.util.Collection<?> |
getCollection()
This returns the specified collection. |
EAttribute |
getEAttribute()
This returns the specified feature as a EReference, if it is one. |
EObject |
getEOwner()
This returns the specified owner as a EObject, if it is one. |
EReference |
getEReference()
This returns the specified feature as a EReference, if it is one. |
EStructuralFeature |
getEStructuralFeature()
This returns the specified feature as a EStructuralFeature, if it is one. |
EObject |
getEValue()
This returns the specified value as a EObject, if it is one. |
java.lang.Object |
getFeature()
This returns the specified feature. |
int |
getIndex()
This returns the specified index. |
java.util.List<?> |
getList()
This returns the specified collection as a list. |
java.lang.Object |
getOwner()
This returns the specified owner. |
EList<?> |
getOwnerList()
This is a safe way to get the list affected by the parameters for an add or remove specification. |
java.util.Collection<java.lang.String> |
getParameters()
This yields an encoding of the owner-child relation. |
java.lang.Object |
getValue()
This returns the specified value. |
void |
setOwner(java.lang.Object owner)
This sets the owner to the specified value. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NO_INDEX
public java.lang.Object owner
public java.lang.Object feature
public java.util.Collection<?> collection
public java.lang.Object value
public int index
Constructor Detail |
---|
public CommandParameter(java.lang.Object owner)
public CommandParameter(java.lang.Object owner, java.lang.Object feature, java.lang.Object value)
public CommandParameter(java.lang.Object owner, java.lang.Object feature, java.lang.Object value, int index)
public CommandParameter(java.lang.Object owner, java.lang.Object feature, java.util.Collection<?> collection)
public CommandParameter(java.lang.Object owner, java.lang.Object feature, java.util.Collection<?> collection, int index)
public CommandParameter(java.lang.Object owner, java.lang.Object feature, java.lang.Object value, java.util.Collection<?> collection)
public CommandParameter(java.lang.Object owner, java.lang.Object feature, java.lang.Object value, java.util.Collection<?> collection, int index)
Method Detail |
---|
public java.lang.Object getOwner()
public EObject getEOwner()
public void setOwner(java.lang.Object owner)
public java.lang.Object getFeature()
public EStructuralFeature getEStructuralFeature()
public EReference getEReference()
public EAttribute getEAttribute()
public EList<?> getOwnerList()
EList
, if the owner is one,
or it tries to get the EList specified by the feature of the owner.
It works as an excellent guard for poorly formed parameters.
public java.util.Collection<?> getCollection()
public java.util.List<?> getList()
public java.lang.Object getValue()
public EObject getEValue()
public int getIndex()
public java.util.Collection<java.lang.String> getParameters()
public static java.lang.String collectionToString(java.util.Collection<?> collection)
public java.lang.String toString()
toString
in class java.lang.Object
|
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 |