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, setSaveSettings
public static final java.lang.String TYPE_IDENTIFIER
public java.lang.String getTypeIdentifier()
Configuration
getTypeIdentifier
in interface Configuration
public TaskConfiguration[] getTasks()
TaskContainerConfiguration
getTasks
in interface TaskContainerConfiguration
public void setTasks(TaskConfiguration[] tasks)
tasks
- the tasks to setpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class MeasurementConfiguration
java.lang.CloneNotSupportedException
public void checkConfiguration() throws ConfigurationException
Configuration
ConfigurationException
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 Configuration
checkConfiguration
in class MeasurementConfiguration
ConfigurationException
public int getNumTasks()
TaskContainerConfiguration
getNumTasks
in interface TaskContainerConfiguration
public TaskConfiguration getTask(int taskID) throws java.lang.IndexOutOfBoundsException
TaskContainerConfiguration
getTask
in interface TaskContainerConfiguration
taskID
- task position.java.lang.IndexOutOfBoundsException
- thrown if task index is invalid.public void removeTask(int taskID) throws java.lang.IndexOutOfBoundsException
TaskContainerConfiguration
removeTask
in interface TaskContainerConfiguration
taskID
- Task id to remove.java.lang.IndexOutOfBoundsException
public void addTask(TaskConfiguration taskConfiguration)
TaskContainerConfiguration
addTask
in interface TaskContainerConfiguration
taskConfiguration
- Task to add.public void insertTask(TaskConfiguration taskConfiguration, int taskID) throws java.lang.IndexOutOfBoundsException
TaskContainerConfiguration
insertTask
in interface TaskContainerConfiguration
taskConfiguration
- Task to add.taskID
- Index where to insert the task.java.lang.IndexOutOfBoundsException