public class TaskMeasurementConfiguration extends MeasurementConfiguration implements TaskContainerConfiguration
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE_IDENTIFIER
The identifier for this measurement type.
|
| Constructor and Description |
|---|
TaskMeasurementConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(TaskConfiguration taskConfiguration)
Adds a new task at the end of the tasks.
|
void |
checkConfiguration()
Checks the current state of the configuration.
|
java.lang.Object |
clone() |
int |
getNumTasks()
Returns the number of tasks in the container.
|
TaskConfiguration |
getTask(int taskID)
Returns the task at the given position.
|
TaskConfiguration[] |
getTasks()
Returns the tasks in the container.
|
java.lang.String |
getTypeIdentifier()
Returns a unique identifier for this configuration type.
|
void |
insertTask(TaskConfiguration taskConfiguration,
int taskID)
Inserts a task at the given position in the task list.
|
void |
removeTask(int taskID)
Removes the task at the given index.
|
void |
setTasks(TaskConfiguration[] tasks) |
getDeviseSettingsOff, getDeviseSettingsOn, getMeasurementRuntime, getName, getSaveSettings, setDeviseSettingsOff, setDeviseSettingsOn, setMeasurementRuntime, setName, setSaveSettingspublic static final java.lang.String TYPE_IDENTIFIER
public java.lang.String getTypeIdentifier()
ConfigurationgetTypeIdentifier in interface Configurationpublic TaskConfiguration[] getTasks()
TaskContainerConfigurationgetTasks in interface TaskContainerConfigurationpublic void setTasks(TaskConfiguration[] tasks)
tasks - the tasks to setpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class MeasurementConfigurationjava.lang.CloneNotSupportedExceptionpublic void checkConfiguration()
throws ConfigurationException
ConfigurationConfigurationException is thrown describing the error, and what has to be changed in the configuration, by the user,
such that it becomes valid. This error can then e.g. be displayed to the user
(see ConfigurationAddonTools.displayConfigurationInvalid(ConfigurationException, YouScopeClient).checkConfiguration in interface ConfigurationcheckConfiguration in class MeasurementConfigurationConfigurationExceptionpublic int getNumTasks()
TaskContainerConfigurationgetNumTasks in interface TaskContainerConfigurationpublic TaskConfiguration getTask(int taskID) throws java.lang.IndexOutOfBoundsException
TaskContainerConfigurationgetTask in interface TaskContainerConfigurationtaskID - task position.java.lang.IndexOutOfBoundsException - thrown if task index is invalid.public void removeTask(int taskID)
throws java.lang.IndexOutOfBoundsException
TaskContainerConfigurationremoveTask in interface TaskContainerConfigurationtaskID - Task id to remove.java.lang.IndexOutOfBoundsExceptionpublic void addTask(TaskConfiguration taskConfiguration)
TaskContainerConfigurationaddTask in interface TaskContainerConfigurationtaskConfiguration - Task to add.public void insertTask(TaskConfiguration taskConfiguration, int taskID) throws java.lang.IndexOutOfBoundsException
TaskContainerConfigurationinsertTask in interface TaskContainerConfigurationtaskConfiguration - Task to add.taskID - Index where to insert the task.java.lang.IndexOutOfBoundsException