Package moa.tasks.meta
Class MetaMainTask
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.tasks.AbstractTask
-
- moa.tasks.MainTask
-
- moa.tasks.meta.MetaMainTask
-
- All Implemented Interfaces:
Configurable
,Serializable
,MOAObject
,OptionHandler
,Task
- Direct Known Subclasses:
ALMainTask
public abstract class MetaMainTask extends MainTask
This class provides features for handling tasks in a tree-like structure of parents and subtasks.- Version:
- $Revision: 1 $
- Author:
- Cornelius Styp von Rekowski (cornelius.styp@ovgu.de)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Color
colorCoding
protected boolean[]
isLastSubtaskOnLevel
protected String
nameSuffix
-
Fields inherited from class moa.tasks.MainTask
INSTANCES_BETWEEN_MONITOR_UPDATES, outputFileOption
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description MetaMainTask()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Color
getColorCoding()
Get the color coding for this task (the color which is used for multi-curve plots).String
getDisplayName()
Get the task's display name consisting of the general task name, indentation showing the tree structure depending on the subtask level and optionally a name suffix given from a supertask.int
getSubtaskLevel()
Get the tasks subtask level (how deep it is in the tree).abstract List<? extends TaskThread>
getSubtaskThreads()
Get the list of threads for all subtasks and recursively the children's subtasks.boolean
isSubtask()
Check if the task is a subtask of another parent.void
setColorCoding(Color newColorCoding)
Set the color coding for this task (the color which is used for multi-curve plots).void
setIsLastSubtaskOnLevel(boolean[] parentIsLastSubtaskList, boolean isLastSubtask)
Set the list of booleans indicating if the current branch in the subtask tree is the last one on its respective level.void
setNameSuffix(String suffix)
Set a suffix for the tasks display name.-
Methods inherited from class moa.tasks.MainTask
doMainTask, doTaskImpl
-
Methods inherited from class moa.tasks.AbstractTask
doTask, doTask, getDescription, getTaskName, prepareForUseImpl
-
Methods inherited from class moa.options.AbstractOptionHandler
copy, getCLICreationString, getOptions, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse
-
Methods inherited from class moa.AbstractMOAObject
copy, measureByteSize, measureByteSize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface moa.MOAObject
measureByteSize
-
Methods inherited from interface moa.tasks.Task
getTaskResultType
-
-
-
-
Method Detail
-
getSubtaskThreads
public abstract List<? extends TaskThread> getSubtaskThreads()
Get the list of threads for all subtasks and recursively the children's subtasks.- Returns:
- list of subtask threads, recursively generated
-
getDisplayName
public String getDisplayName()
Get the task's display name consisting of the general task name, indentation showing the tree structure depending on the subtask level and optionally a name suffix given from a supertask.- Returns:
- display name
-
setNameSuffix
public void setNameSuffix(String suffix)
Set a suffix for the tasks display name.- Parameters:
suffix
-
-
setIsLastSubtaskOnLevel
public void setIsLastSubtaskOnLevel(boolean[] parentIsLastSubtaskList, boolean isLastSubtask)
Set the list of booleans indicating if the current branch in the subtask tree is the last one on its respective level.- Parameters:
parentIsLastSubtaskList
- the internal list of the parentisLastSubtask
- if the current subtask is the parents last one
-
getSubtaskLevel
public int getSubtaskLevel()
Get the tasks subtask level (how deep it is in the tree). 0 is the root task level.- Returns:
-
isSubtask
public boolean isSubtask()
Check if the task is a subtask of another parent.- Returns:
- true if the task is a subtask
-
setColorCoding
public void setColorCoding(Color newColorCoding)
Set the color coding for this task (the color which is used for multi-curve plots).- Parameters:
newColorCoding
- the new color coding for this task
-
getColorCoding
public Color getColorCoding()
Get the color coding for this task (the color which is used for multi-curve plots).- Returns:
- the color coding for this task
-
-