Apache JMeter

## org.apache.jmeter.threads
Class JMeterVariables

    java.lang.Object
      org.apache.jmeter.threads.JMeterVariables

    public class JMeterVariables

extends Object

Class which defines JMeter variables. These are similar to properties, but they are local to a single thread.

Constructor Summary
`JMeterVariables()`

Method Summary
`Set<Map.Entry<String,Object>>` `entrySet()`
`String` `get(String key)` Gets the value of a variable, coerced to a String.
`int` `getIteration()`
`Iterator<Map.Entry<String,Object>>` `getIterator()` Gets a read-only Iterator over the variables.
`Object` `getObject(String key)` Gets the value of a variable (not converted to String).
`String` `getThreadName()`
`void` `incIteration()`
`void` `initialize()`
`void` `put(String key, String value)` Creates or updates a variable with a String value.
`void` `putAll(JMeterVariables vars)`
`void` `putAll(Map<String,?> vars)`
`void` `putObject(String key, Object value)` Creates or updates a variable with a value that does not have to be a String.
`Object` `remove(String key)` Remove a variable.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JMeterVariables

    public JMeterVariables()

Method Detail

### getThreadName

    public String getThreadName()

### getIteration

    public int getIteration()

### incIteration

    public void incIteration()

### initialize

    public void initialize()

### remove

    public Object remove(String key)

  Remove a variable.

  Parameters:
    `key` - the variable name to remove
  Returns:
    the variable value, or `null` if there was no such variable

### put

    public void put(String key,
                    String value)

  Creates or updates a variable with a String value.

  Parameters:
    `key` - the variable name
    `value` - the variable value

### putObject

    public void putObject(String key,
                          Object value)

  Creates or updates a variable with a value that does not have to be a String.

  Parameters:
    `key` - the variable name
    `value` - the variable value

### putAll

    public void putAll(Map<String,?> vars)

### putAll

    public void putAll(JMeterVariables vars)

### get

    public String get(String key)

  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

    public Object getObject(String key)

  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

    public Iterator<Map.Entry<String,Object>> getIterator()

  Gets a read-only Iterator over the variables.

  Returns:
    the iterator

### entrySet

    public Set<Map.Entry<String,Object>> entrySet()

Apache JMeter

Copyright © 1998-2012 Apache Software Foundation. All Rights Reserved.