public class JMeterVariables
extends java.lang.Object
Constructor and Description |
---|
JMeterVariables()
Constructor, that preloads the variables from the JMeter properties
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
entrySet() |
java.lang.String |
get(java.lang.String key)
Gets the value of a variable, converted to a String.
|
int |
getIteration() |
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
getIterator()
Gets a read-only Iterator over the variables.
|
java.lang.Object |
getObject(java.lang.String key)
Gets the value of a variable (not converted to String).
|
java.lang.String |
getThreadName() |
void |
incIteration()
Increase the current number of iterations
|
void |
put(java.lang.String key,
java.lang.String value)
Creates or updates a variable with a String value.
|
void |
putAll(JMeterVariables vars)
Updates the variables with all entries found in the variables in
vars |
void |
putAll(java.util.Map<java.lang.String,?> vars)
Updates the variables with all entries found in the
Map vars |
void |
putObject(java.lang.String key,
java.lang.Object value)
Creates or updates a variable with a value that does not have to be a String.
|
java.lang.Object |
remove(java.lang.String key)
Remove a variable.
|
public JMeterVariables()
public java.lang.String getThreadName()
public int getIteration()
public void incIteration()
public java.lang.Object remove(java.lang.String key)
key
- the variable name to removenull
if there was no such variablepublic void put(java.lang.String key, java.lang.String value)
key
- the variable namevalue
- the variable valuepublic void putObject(java.lang.String key, java.lang.Object value)
key
- the variable namevalue
- the variable valuepublic void putAll(java.util.Map<java.lang.String,?> vars)
Map
vars
vars
- map with the entries to be updatedpublic void putAll(JMeterVariables vars)
vars
vars
- JMeterVariables
with the entries to be updatedpublic java.lang.String get(java.lang.String key)
key
- the name of the variablenull
if it does not existpublic java.lang.Object getObject(java.lang.String key)
key
- the name of the variablenull
if it does not existpublic java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Object>> getIterator()
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
JMeterVariables
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.