Package org.apache.jmeter.config

# Class Arguments

java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.config.ConfigTestElement
org.apache.jmeter.config.Arguments

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Iterable<JMeterProperty>`, `ConfigElement`, `Searchable`, `org.apache.jmeter.testelement.TestElement`

public class Arguments extends ConfigTestElement implements Serializable, Iterable<JMeterProperty>
A set of Argument objects.

See Also:
  - Serialized Form

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElement

`org.apache.jmeter.testelement.TestElement.Companion`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ARGUMENTS`
The name of the property used to store the arguments.

### Fields inherited from class org.apache.jmeter.config.ConfigTestElement

`PASSWORD, USERNAME`

### Fields inherited from interface org.apache.jmeter.testelement.TestElement

`COMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

## Constructor Summary

Constructors
Constructor
Description
`Arguments()`
Create a new Arguments object with no arguments.

## Method Summary

Modifier and Type
Method
Description
`void`
`addArgument(String name, String value)`
Add a new argument with the given name and value.
`void`
`addArgument(String name, String value, String metadata)`
Add a new argument with the given name, value, and metadata.
`void`
`addArgument(String name, String value, String metadata, String description)`
Add a new argument with the given name, value, metadata and description
`void`
`addArgument(Argument arg)`
Add a new argument.
`void`
`addEmptyArgument()`
Add a new empty argument to the list.
`void`
`clear()`
Clear the arguments.
`Argument`
`getArgument(int row)`
Get a single argument.
`int`
`getArgumentCount()`
Get the number of arguments in the list.
`CollectionProperty`
`getArguments()`
Get the arguments.
`Map<String,String>`
`getArgumentsAsMap()`
Get the arguments as a Map.
`org.apache.jmeter.testelement.schema.PropertiesAccessor<? extends Arguments,? extends org.apache.jmeter.config.ArgumentsSchema>`
`getProps()`
`org.apache.jmeter.config.ArgumentsSchema`
`getSchema()`
`PropertyIterator`
`iterator()`
Get a PropertyIterator of the arguments.
`void`
`removeAllArguments()`
Remove all arguments from the list.
`void`
`removeArgument(int row)`
Remove the specified argument from the list.
`void`
`removeArgument(String argName)`
Remove the argument with the specified name.
`void`
`removeArgument(String argName, String argValue)`
Remove the argument with the specified name and value.
`void`
`removeArgument(Argument arg)`
Remove the specified argument from the list.
`void`
`setArguments(List<Argument> arguments)`
Set the list of arguments.
`String`
`toString()`
Create a string representation of the arguments.

### Methods inherited from class org.apache.jmeter.config.ConfigTestElement

`addConfigElement, addTestElement, expectsModification`

### Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

`addPropertiesValues, addProperty, addProperty, canRemove, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.jmeter.config.ConfigElement

`clone`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Methods inherited from interface org.apache.jmeter.testelement.TestElement

`get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getPropertyOrNull, getString, removed, removeProperty, set, set, set, set, set, set, set, set, set`

## Field Details

### ARGUMENTS

public static final String ARGUMENTS
The name of the property used to store the arguments.

See Also:
  - Constant Field Values

## Constructor Details

### Arguments

public Arguments()
Create a new Arguments object with no arguments.

## Method Details

### getSchema

public org.apache.jmeter.config.ArgumentsSchema getSchema()

Specified by:
  `getSchema` in interface `org.apache.jmeter.testelement.TestElement`
Overrides:
  `getSchema` in class `ConfigTestElement`

### getProps

public org.apache.jmeter.testelement.schema.PropertiesAccessor<? extends Arguments,? extends org.apache.jmeter.config.ArgumentsSchema> getProps()

Specified by:
  `getProps` in interface `org.apache.jmeter.testelement.TestElement`
Overrides:
  `getProps` in class `ConfigTestElement`

### getArguments

public CollectionProperty getArguments()
Get the arguments.

Returns:
  the arguments

### clear

public void clear()
Clear the arguments.

Specified by:
  `clear` in interface `org.apache.jmeter.testelement.TestElement`
Overrides:
  `clear` in class `AbstractTestElement`

### setArguments

public void setArguments(List<Argument> arguments)
Set the list of arguments. Any existing arguments will be lost.

Parameters:
  `arguments` - the new arguments

### getArgumentsAsMap

public Map<String,String> getArgumentsAsMap()
Get the arguments as a Map. Each argument name is used as the key, and its value as the value.

Returns:
  a new Map with String keys and values containing the arguments

### addArgument

public void addArgument(String name, String value)
Add a new argument with the given name and value.

Parameters:
  `name` - the name of the argument
  `value` - the value of the argument

### addArgument

public void addArgument(Argument arg)
Add a new argument.

Parameters:
  `arg` - the new argument

### addArgument

public void addArgument(String name, String value, String metadata)
Add a new argument with the given name, value, and metadata.

Parameters:
  `name` - the name of the argument
  `value` - the value of the argument
  `metadata` - the metadata for the argument

### addArgument

public void addArgument(String name, String value, String metadata, String description)
Add a new argument with the given name, value, metadata and description

Parameters:
  `name` - the name of the argument
  `value` - the value of the argument
  `metadata` - the metadata for the argument
  `description` - the argument description

### iterator

public PropertyIterator iterator()
Get a PropertyIterator of the arguments.

Specified by:
  `iterator` in interface `Iterable<JMeterProperty>`
Returns:
  an iteration of the arguments

### toString

public String toString()
Create a string representation of the arguments.

Overrides:
  `toString` in class `Object`
Returns:
  the string representation of the arguments

### removeArgument

public void removeArgument(int row)
Remove the specified argument from the list.

Parameters:
  `row` - the index of the argument to remove

### removeArgument

public void removeArgument(Argument arg)
Remove the specified argument from the list.

Parameters:
  `arg` - the argument to remove

### removeArgument

public void removeArgument(String argName)
Remove the argument with the specified name.

Parameters:
  `argName` - the name of the argument to remove

### removeArgument

public void removeArgument(String argName, String argValue)
Remove the argument with the specified name and value.

Parameters:
  `argName` - the name of the argument to remove
  `argValue` - the value to compare - must not be null

### removeAllArguments

public void removeAllArguments()
Remove all arguments from the list.

### addEmptyArgument

public void addEmptyArgument()
Add a new empty argument to the list. The new argument will have the empty string as its name and value, and null metadata.

### getArgumentCount

public int getArgumentCount()
Get the number of arguments in the list.

Returns:
  the number of arguments

### getArgument

public Argument getArgument(int row)
Get a single argument.

Parameters:
  `row` - the index of the argument to return.
Returns:
  the argument at the specified index, or null if no argument exists at that index.