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 theActionableinterface.ActionableTestis a subclass ofTestand overrides itsprintmethod.
ActionableTestalso implementsActionableand defines itsactionmethod. When creating aTask, an instance ofActionableTesthas 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 voidaction()When an object implementing interfaceActionableis used to create a task, starting the task causes the object'sactionmethod to be called in that separately executing action.voidprint()
-
-
-
Field Detail
-
t
static Task t
-
-
Method Detail
-
action
public void action()
Description copied from interface:ActionableWhen an object implementing interfaceActionableis used to create a task, starting the task causes the object'sactionmethod to be called in that separately executing action.The general contract of the method
actionis that it may take any action whatsoever.- Specified by:
actionin interfaceActionable
-
-