Package moa.tasks

Class AbstractTask

    • Constructor Detail

      • AbstractTask

        public AbstractTask()
    • Method Detail

      • getTaskName

        public String getTaskName()
        Gets the name of this task.
        Returns:
        the name of this task
      • doTask

        public Object doTask()
        Description copied from interface: Task
        This method performs this task, when TaskMonitor and ObjectRepository are no needed.
        Specified by:
        doTask in interface Task
        Returns:
        an object with the result of this task
      • doTask

        public Object doTask​(TaskMonitor monitor,
                             ObjectRepository repository)
        Description copied from interface: Task
        This method performs this task. AbstractTask implements this method so all its extensions only need to implement doTaskImpl
        Specified by:
        doTask in interface Task
        Parameters:
        monitor - the TaskMonitor to use
        repository - the ObjectRepository to use
        Returns:
        an object with the result of this task
      • doTaskImpl

        protected abstract Object doTaskImpl​(TaskMonitor monitor,
                                             ObjectRepository repository)
        This method performs this task. AbstractTask implements doTask so all its extensions only need to implement doTaskImpl.
        Parameters:
        monitor - the TaskMonitor to use
        repository - the ObjectRepository to use
        Returns:
        an object with the result of this task
      • prepareForUseImpl

        protected void prepareForUseImpl​(TaskMonitor monitor,
                                         ObjectRepository repository)
        Description copied from class: AbstractOptionHandler
        This method describes the implementation of how to prepare this object for use. All classes that extends this class have to implement prepareForUseImpl and not prepareForUse since prepareForUse calls prepareForUseImpl.
        Specified by:
        prepareForUseImpl in class AbstractOptionHandler
        Parameters:
        monitor - the TaskMonitor to use
        repository - the ObjectRepository to use
      • getDescription

        public void getDescription​(StringBuilder sb,
                                   int indent)
        Description copied from interface: MOAObject
        Returns a string representation of this object. Used in AbstractMOAObject.toString to give a string representation of the object.
        Specified by:
        getDescription in interface MOAObject
        Parameters:
        sb - the stringbuilder to add the description
        indent - the number of characters to indent