|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.perfectjpattern.core.behavioral.command.Command<P,R>
P - Command Parameter context-specific.R - Command Result context-specific.public class Command<P,R>
Base core implementation of ICommand interface.
ICommand![]() |
![]() |
| Constructor Summary | |
|---|---|
Command()
|
|
Command(IReceiver<P,R> aReceiver)
|
|
| Method Summary | |
|---|---|
void |
execute()
Executes the ICommand. |
R |
getResult()
Returns the result of this ICommand execution. |
void |
setParameter(P aParameter)
Sets the parameter required for the execution of the target IReceiver. |
void |
setReceiver(IReceiver<P,R> aReceiver)
Sets the IReceiver associated to this ICommand |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Command()
public Command(IReceiver<P,R> aReceiver)
| Method Detail |
|---|
public R getResult()
throws IllegalStateException
ICommand execution.
getResult in interface ICommand<P,R>ICommand execution.
IllegalStateException - IReceiver was not set.
public void setParameter(P aParameter)
throws IllegalArgumentException
IReceiver.
setParameter in interface ICommand<P,R>aParameter - Parameter required for the execution of the target
IReceiver.
IllegalArgumentException - 'aParameter' must not be null.
public void setReceiver(IReceiver<P,R> aReceiver)
throws IllegalArgumentException
IReceiver associated to this ICommand
setReceiver in interface ICommand<P,R>aReceiver - to set
IllegalArgumentException - 'aReceiver' must not be null.
public void execute()
throws IllegalStateException
ICommand.
execute in interface ICommand<P,R>IllegalStateException - IReceiver was not set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||