public abstract class MetricStateTransitionCommand extends java.lang.Object implements StateTransitionCommand
Child classes MUST implement a 2 parameters constructor that calls the method in this class:
e.g. public CreatedToOnUpdate(Element before, Element after){
super(before, after);
}
Child should overrides execute method and call it like super class method:
e.g. public void execute(){
super.execute();
foo(things);
...
}
Modifier and Type | Field and Description |
---|---|
protected Metric |
after |
protected Metric |
before |
Constructor and Description |
---|
MetricStateTransitionCommand(Element before,
Element after)
this method simply casts Element to Metric objects passed like parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
This is a prototype of the real method that will be implemented by child classes.
|
public void execute() throws java.lang.Exception
execute
in interface StateTransitionCommand
java.lang.Exception