|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.common.command.AbstractCommand org.eclipse.emf.common.command.IdentityCommand
public class IdentityCommand
A command that always produces the same result.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
AbstractCommand.NonDirtying |
Field Summary | |
---|---|
static IdentityCommand |
INSTANCE
An empty instance of this object. |
protected java.util.Collection<?> |
result
Keeps track of the result returned from getResult() . |
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
description, isExecutable, isPrepared, label |
Constructor Summary | |
---|---|
IdentityCommand()
Creates an empty instance. |
|
IdentityCommand(java.util.Collection<?> result)
Creates an instance with the given result collection. |
|
IdentityCommand(java.lang.Object result)
Creates an instance with a result collection containing the given result object. |
|
IdentityCommand(java.lang.String label)
Creates an instance with the given label. |
|
IdentityCommand(java.lang.String label,
java.util.Collection<?> result)
Creates an instance with the given label the result collection. |
|
IdentityCommand(java.lang.String label,
java.lang.Object result)
Creates an instance with the given label and a result collection containing the given result object. |
|
IdentityCommand(java.lang.String label,
java.lang.String description)
Creates an instance with the given label and description. |
|
IdentityCommand(java.lang.String label,
java.lang.String description,
java.util.Collection<?> result)
Creates an instance with the given label, description, result collection. |
|
IdentityCommand(java.lang.String label,
java.lang.String description,
java.lang.Object result)
Creates an instance with the given label, description, and a result collection containing the given result object. |
Method Summary | |
---|---|
boolean |
canExecute()
Returns true . |
void |
execute()
Do nothing. |
java.lang.String |
getDescription()
Returns a string suitable to help describe the effect of this command. |
java.lang.String |
getLabel()
Returns a string suitable to represent the label that identifies this command. |
java.util.Collection<?> |
getResult()
Return the identity result. |
void |
redo()
Do nothing. |
void |
undo()
Do nothing. |
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
canUndo, chain, dispose, getAffectedObjects, prepare, setDescription, setLabel, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final IdentityCommand INSTANCE
protected java.util.Collection<?> result
getResult()
.
Constructor Detail |
---|
public IdentityCommand()
public IdentityCommand(java.lang.Object result)
result
- the one object in the result collection.public IdentityCommand(java.util.Collection<?> result)
result
- the result collection.public IdentityCommand(java.lang.String label)
label
- the label.public IdentityCommand(java.lang.String label, java.lang.Object result)
label
- the label.result
- the one object in the result collection.public IdentityCommand(java.lang.String label, java.util.Collection<?> result)
label
- the label.result
- the result collection.public IdentityCommand(java.lang.String label, java.lang.String description)
label
- the label.description
- the description.public IdentityCommand(java.lang.String label, java.lang.String description, java.lang.Object result)
label
- the label.description
- the description.result
- the one object in the result collection.public IdentityCommand(java.lang.String label, java.lang.String description, java.util.Collection<?> result)
label
- the label.description
- the description.result
- the result collection.Method Detail |
---|
public boolean canExecute()
true
.
canExecute
in interface Command
canExecute
in class AbstractCommand
true
.public void execute()
public void undo()
undo
in interface Command
undo
in class AbstractCommand
public void redo()
public java.lang.String getLabel()
Command
getLabel
in interface Command
getLabel
in class AbstractCommand
public java.lang.String getDescription()
Command
getDescription
in interface Command
getDescription
in class AbstractCommand
public java.util.Collection<?> getResult()
getResult
in interface Command
getResult
in class AbstractCommand
|
Copyright 2001-2012 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |