org.hackystat.sensor.xmldata.option
Class SetRuntimeOption

java.lang.Object
  extended by org.hackystat.sensor.xmldata.option.AbstractOption
      extended by org.hackystat.sensor.xmldata.option.SetRuntimeOption
All Implemented Interfaces:
Option

public class SetRuntimeOption
extends AbstractOption

The option used to mark all data sent by this sensor as a batch of data. A batch of data is marked by having the same runtime.

Author:
aito

Field Summary
static java.lang.String OPTION_NAME
          This option's name, which is "-setRuntime".
 
Constructor Summary
SetRuntimeOption(XmlDataController controller, java.util.List<java.lang.String> parameters)
          Creates this option with the specified controller and parameters.
 
Method Summary
 boolean isValid()
          Returns true if the list of parameters contains only no elements.
 void process()
          Processes this option by setting the runtime option to true.
 
Methods inherited from class org.hackystat.sensor.xmldata.option.AbstractOption
execute, getController, getName, getParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_NAME

public static final java.lang.String OPTION_NAME
This option's name, which is "-setRuntime".

See Also:
Constant Field Values
Constructor Detail

SetRuntimeOption

public SetRuntimeOption(XmlDataController controller,
                        java.util.List<java.lang.String> parameters)
Creates this option with the specified controller and parameters.

Parameters:
controller - the specified controller.
parameters - the specified parameters.
Method Detail

process

public void process()
Processes this option by setting the runtime option to true.

Specified by:
process in interface Option
Overrides:
process in class AbstractOption

isValid

public boolean isValid()
Returns true if the list of parameters contains only no elements.

Specified by:
isValid in interface Option
Specified by:
isValid in class AbstractOption
Returns:
true if the parameters are valid, false if not.