Package org.deepjava.runtime.mpc555.demo
Class ActionableTest
- java.lang.Object
-
- org.deepjava.runtime.mpc555.demo.Test
-
- org.deepjava.runtime.mpc555.demo.ActionableTest
-
- All Implemented Interfaces:
Actionable
public class ActionableTest extends Test implements Actionable
This test class demonstrates the use of theActionable
interface.ActionableTest
is a subclass ofTest
and overrides itsprint
method.
ActionableTest
also implementsActionable
and defines itsaction
method. When creating aTask
, an instance ofActionableTest
has to be passed as a parameter.
This test class will printout "hello world" five times and then stops.- Author:
- Urs Graf
-
-
Constructor Summary
Constructors Constructor Description ActionableTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
action()
When an object implementing interfaceActionable
is used to create a task, starting the task causes the object'saction
method to be called in that separately executing action.void
print()
-
-
-
Field Detail
-
t
static Task t
-
-
Method Detail
-
action
public void action()
Description copied from interface:Actionable
When an object implementing interfaceActionable
is used to create a task, starting the task causes the object'saction
method to be called in that separately executing action.The general contract of the method
action
is that it may take any action whatsoever.- Specified by:
action
in interfaceActionable
-
-