Package org.apache.jmeter.threads
Class JMeterVariables
java.lang.Object
org.apache.jmeter.threads.JMeterVariables
Class which defines JMeter variables.
These are similar to properties, but they are local to a single thread.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionentrySet()
Gets the value of a variable, coerced to a String.int
Gets a read-only Iterator over the variables.Gets the value of a variable (not converted to String).void
void
void
Creates or updates a variable with a String value.void
void
putAll
(JMeterVariables vars) void
Creates or updates a variable with a value that does not have to be a String.Remove a variable.
-
Constructor Details
-
JMeterVariables
public JMeterVariables()
-
-
Method Details
-
getThreadName
-
getIteration
public int getIteration() -
incIteration
public void incIteration() -
initialize
public void initialize() -
remove
Remove a variable.- Parameters:
key
- the variable name to remove- Returns:
- the variable value, or
null
if there was no such variable
-
put
Creates or updates a variable with a String value.- Parameters:
key
- the variable namevalue
- the variable value
-
putObject
Creates or updates a variable with a value that does not have to be a String.- Parameters:
key
- the variable namevalue
- the variable value
-
putAll
-
putAll
-
get
Gets the value of a variable, coerced to a String.- Parameters:
key
- the name of the variable- Returns:
- the value of the variable, or
null
if it does not exist
-
getObject
Gets the value of a variable (not converted to String).- Parameters:
key
- the name of the variable- Returns:
- the value of the variable, or
null
if it does not exist
-
getIterator
Gets a read-only Iterator over the variables.- Returns:
- the iterator
-
entrySet
-