Package moa.tasks

Class NullMonitor

  • All Implemented Interfaces:
    TaskMonitor

    public class NullMonitor
    extends Object
    implements TaskMonitor
    Class that represents a null monitor.
    Version:
    $Revision: 7 $
    Author:
    Richard Kirkby (rkirkby@cs.waikato.ac.nz)
    • Constructor Detail

      • NullMonitor

        public NullMonitor()
    • Method Detail

      • setCurrentActivity

        public void setCurrentActivity​(String activityDescription,
                                       double fracComplete)
        Description copied from interface: TaskMonitor
        Sets the description and the percentage done of the current activity.
        Specified by:
        setCurrentActivity in interface TaskMonitor
        Parameters:
        activityDescription - the description of the current activity
        fracComplete - the percentage done of the current activity
      • setCurrentActivityDescription

        public void setCurrentActivityDescription​(String activity)
        Description copied from interface: TaskMonitor
        Sets the description of the current activity.
        Specified by:
        setCurrentActivityDescription in interface TaskMonitor
        Parameters:
        activity - the description of the current activity
      • setCurrentActivityFractionComplete

        public void setCurrentActivityFractionComplete​(double fracComplete)
        Description copied from interface: TaskMonitor
        Sets the percentage done of the current activity
        Specified by:
        setCurrentActivityFractionComplete in interface TaskMonitor
        Parameters:
        fracComplete - the percentage done of the current activity
      • taskShouldAbort

        public boolean taskShouldAbort()
        Description copied from interface: TaskMonitor
        Gets whether the task should abort.
        Specified by:
        taskShouldAbort in interface TaskMonitor
        Returns:
        true if the task should abort
      • getCurrentActivityDescription

        public String getCurrentActivityDescription()
        Description copied from interface: TaskMonitor
        Gets the description of the current activity.
        Specified by:
        getCurrentActivityDescription in interface TaskMonitor
        Returns:
        the description of the current activity
      • getCurrentActivityFractionComplete

        public double getCurrentActivityFractionComplete()
        Description copied from interface: TaskMonitor
        Gets the percentage done of the current activity
        Specified by:
        getCurrentActivityFractionComplete in interface TaskMonitor
        Returns:
        the percentage done of the current activity
      • isPaused

        public boolean isPaused()
        Description copied from interface: TaskMonitor
        Gets whether the task monitored is paused.
        Specified by:
        isPaused in interface TaskMonitor
        Returns:
        true if the task is paused
      • isCancelled

        public boolean isCancelled()
        Description copied from interface: TaskMonitor
        Gets whether the task monitored is cancelled.
        Specified by:
        isCancelled in interface TaskMonitor
        Returns:
        true if the task is cancelled
      • requestCancel

        public void requestCancel()
        Description copied from interface: TaskMonitor
        Requests the task monitored to cancel.
        Specified by:
        requestCancel in interface TaskMonitor
      • requestPause

        public void requestPause()
        Description copied from interface: TaskMonitor
        Requests the task monitored to pause.
        Specified by:
        requestPause in interface TaskMonitor
      • requestResume

        public void requestResume()
        Description copied from interface: TaskMonitor
        Requests the task monitored to resume.
        Specified by:
        requestResume in interface TaskMonitor
      • resultPreviewRequested

        public boolean resultPreviewRequested()
        Description copied from interface: TaskMonitor
        Gets whether there is a request for preview the task result.
        Specified by:
        resultPreviewRequested in interface TaskMonitor
        Returns:
        true if there is a request for preview the task result
      • setLatestResultPreview

        public void setLatestResultPreview​(Object latestPreview)
        Description copied from interface: TaskMonitor
        Sets the current result to preview
        Specified by:
        setLatestResultPreview in interface TaskMonitor
        Parameters:
        latestPreview - the result to preview
      • requestResultPreview

        public void requestResultPreview​(ResultPreviewListener toInform)
        Description copied from interface: TaskMonitor
        Requests to preview the task result.
        Specified by:
        requestResultPreview in interface TaskMonitor
        Parameters:
        toInform - the listener of the changes in the preview of the result