Package com.xceptance.xlt.api.engine
Class CustomValue
- java.lang.Object
-
- com.xceptance.xlt.api.engine.AbstractData
-
- com.xceptance.xlt.api.engine.CustomValue
-
- All Implemented Interfaces:
Data
public class CustomValue extends AbstractData
TheCustomValuecan store a single 'double' value.
-
-
Constructor Summary
Constructors Constructor Description CustomValue()Creates a newCustomValueobject.CustomValue(java.lang.String name)Creates a newCustomValueobject and gives it the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.lang.String>addValues()Builds a list of string values that represents the state of this object.protected intgetMinNoCSVElements()Returns the minimum number of elements in the CSV string.doublegetValue()Returns the value.protected voidparseValues(java.lang.String[] values)Recreates the state of this object from an array of string values.voidsetValue(double value)Sets the value.-
Methods inherited from class com.xceptance.xlt.api.engine.AbstractData
fromCSV, getAgentName, getName, getTime, getTransactionName, getTypeCode, setAgentName, setName, setTime, setTime, setTransactionName, toCSV
-
-
-
-
Constructor Detail
-
CustomValue
public CustomValue(java.lang.String name)
Creates a newCustomValueobject and gives it the specified name. Furthermore, the start time attribute is set to the current time.- Parameters:
name- the statistics name
-
CustomValue
public CustomValue()
Creates a newCustomValueobject.
-
-
Method Detail
-
setValue
public void setValue(double value)
Sets the value.- Parameters:
value- the value
-
getValue
public double getValue()
Returns the value.- Returns:
- the value
-
addValues
protected java.util.List<java.lang.String> addValues()
Builds a list of string values that represents the state of this object. Override this method in sub classes to add custom values and use the list created by the super class.- Overrides:
addValuesin classAbstractData- Returns:
- the list of values
-
getMinNoCSVElements
protected int getMinNoCSVElements()
Returns the minimum number of elements in the CSV string.- Overrides:
getMinNoCSVElementsin classAbstractData- Returns:
- minimum number of elements in the CSV string
-
parseValues
protected void parseValues(java.lang.String[] values)
Recreates the state of this object from an array of string values. Override this method in sub classes to restore custom values, but do not forget to call the super class first.- Overrides:
parseValuesin classAbstractData- Parameters:
values- the list of values, must have at least the lengthAbstractData.getMinNoCSVElements()
-
-