Class ActionableTest

  • All Implemented Interfaces:
    Actionable

    public class ActionableTest
    extends Test
    implements Actionable
    This test class demonstrates the use of the Actionable interface. ActionableTest is a subclass of Test and overrides its print method.
    ActionableTest also implements Actionable and defines its action method. When creating a Task, an instance of ActionableTest has to be passed as a parameter.
    This test class will printout "hello world" five times and then stops.
    Author:
    Urs Graf
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static Task t  
      • Fields inherited from class org.deepjava.runtime.mpc555.demo.Test

        str
    • Constructor Summary

      Constructors 
      Constructor Description
      ActionableTest()  
    • Field Detail

    • Constructor Detail

      • ActionableTest

        public ActionableTest()
    • Method Detail

      • action

        public void action()
        Description copied from interface: Actionable
        When an object implementing interface Actionable is used to create a task, starting the task causes the object's action 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 interface Actionable
      • print

        public void print()
        Overrides:
        print in class Test