|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.rode.thesis.command.CommandProcessingResult<E>
E
- The type of result obtained from the executed commands.public class CommandProcessingResult<E>
A command processing result represents the result of
executing
a list commands by a given command processor
.
The result can represent two scenarios:
executed
is true, and
result
stores the value, which may be null. The
result is the command value
fetched from the last - possibly spawned - command
executed.
executed
is false, and result
is always
null.
CommandProcessor.execute(List)
,
Command.getResult()
Field Summary | |
---|---|
boolean |
executed
True if the commands that generated this result were successfully executed, and hence the value of result is known to be valid. |
E |
result
The result of the command execution. |
Constructor Summary | |
---|---|
CommandProcessingResult(boolean executed,
E result)
Constructor. |
Method Summary | |
---|---|
String |
toString()
Returns the string representation of this result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final boolean executed
result
is known to be valid.
If false, the execution failed, but all commands were successfully
undone. The value of result
will always be null in such
cases.
public final E result
The value is the result value
from
the last - possibly spawned - command executed.
Can be null, even if executed
is true.
Constructor Detail |
---|
CommandProcessingResult(boolean executed, E result)
executed
- The executed flag.result
- The result of the execution; can be null.Method Detail |
---|
public String toString()
toString
in class Object
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |