org.apache.jmeter.testelement.property

## Class MapProperty

- java.lang.Object
- - org.apache.jmeter.testelement.property.AbstractProperty
  - - org.apache.jmeter.testelement.property.MultiProperty
    - - org.apache.jmeter.testelement.property.MapProperty

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<JMeterProperty>, java.lang.Iterable<JMeterProperty>, JMeterProperty

      public class MapProperty
      extends MultiProperty

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.apache.jmeter.testelement.property.AbstractProperty

      `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapProperty()`
    `MapProperty(java.lang.String name, java.util.Map<?,?> value)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addProperty(JMeterProperty prop)` Add a property to the collection.
    `void` | `addProperty(java.lang.String name, JMeterProperty prop)`
    `void` | `clear()` Clear away all values in the property.
    `MapProperty` | `clone()`
    `boolean` | `equals(java.lang.Object o)` Determines if the two objects are equal by comparing names and values
    `JMeterProperty` | `get(java.lang.String key)`
    `java.lang.Object` | `getObjectValue()`
    `protected java.lang.Class<? extends JMeterProperty>` | `getPropertyType()` Figures out what kind of properties this collection is holding and returns the class type.
    `java.lang.String` | `getStringValue()`
    `int` | `hashCode()`
    `PropertyIterator` | `iterator()` Get the property iterator to iterate through the sub-values of this JMeterProperty.
    `void` | `recoverRunningVersion(TestElement owner)` Tell the property to revert to the state at the time setRunningVersion(true) was called.
    `void` | `setMap(java.util.Map<?,?> newMap)`
    `void` | `setObjectValue(java.lang.Object v)`
    `void` | `setRunningVersion(boolean running)` Make the property a running version or turn it off as the running version.
    `PropertyIterator` | `valueIterator()`

    - ### Methods inherited from class org.apache.jmeter.testelement.property.MultiProperty

      `mergeIn, recoverRunningVersionOfSubElements`

    - ### Methods inherited from class org.apache.jmeter.testelement.property.AbstractProperty

      `compareTo, convertObject, createProperty, getBlankProperty, getBlankProperty, getBooleanValue, getDoubleValue, getFloatValue, getIntValue, getIterator, getLongValue, getName, isEqualType, isRunningVersion, makeProperty, normalizeList, normalizeMap, setName, toString`

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

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

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

      `forEach, spliterator`

- - ### Constructor Detail

    - #### MapProperty

          public MapProperty(java.lang.String name,
                             java.util.Map<?,?> value)

    - #### MapProperty

          public MapProperty()

  - ### Method Detail

    - #### equals

          public boolean equals(java.lang.Object o)

      Determines if the two objects are equal by comparing names and values
      Overrides:
        `equals` in class `AbstractProperty`
      Returns:
        true if names are equal and values are equal (or both null)

    - #### hashCode

          public int hashCode()

      Description copied from class: `AbstractProperty`
      Overrides:
        `hashCode` in class `AbstractProperty`

    - #### setObjectValue

          public void setObjectValue(java.lang.Object v)

    - #### addProperty

          public void addProperty(JMeterProperty prop)

      Add a property to the collection.
      Specified by:
        `addProperty` in class `MultiProperty`
      Parameters:
        `prop` - the `JMeterProperty` to add

    - #### get

          public JMeterProperty get(java.lang.String key)

    - #### getPropertyType

          protected java.lang.Class<? extends JMeterProperty> getPropertyType()

      Figures out what kind of properties this collection is holding and returns the class type.
      Overrides:
        `getPropertyType` in class `AbstractProperty`
      Returns:
        property type of this property
      See Also:
        `AbstractProperty.getPropertyType()`

    - #### getStringValue

          public java.lang.String getStringValue()

    - #### getObjectValue

          public java.lang.Object getObjectValue()

    - #### clone

          public MapProperty clone()

      Specified by:
        `clone` in interface `JMeterProperty`
      Overrides:
        `clone` in class `AbstractProperty`

    - #### valueIterator

          public PropertyIterator valueIterator()

    - #### addProperty

          public void addProperty(java.lang.String name,
                                  JMeterProperty prop)

    - #### setMap

          public void setMap(java.util.Map<?,?> newMap)

    - #### recoverRunningVersion

          public void recoverRunningVersion(TestElement owner)

      Tell the property to revert to the state at the time setRunningVersion(true) was called.
      Parameters:
        `owner` - the owning element

    - #### clear

          public void clear()

      Clear away all values in the property.
      Specified by:
        `clear` in class `MultiProperty`

    - #### iterator

          public PropertyIterator iterator()

      Get the property iterator to iterate through the sub-values of this JMeterProperty.
      Specified by:
        `iterator` in interface `java.lang.Iterable<JMeterProperty>`
      Specified by:
        `iterator` in class `MultiProperty`
      Returns:
        an iterator for the sub-values of this property

    - #### setRunningVersion

          public void setRunningVersion(boolean running)

      Make the property a running version or turn it off as the running version. A property that is made a running version will preserve the current state in such a way that it is retrievable by a future call to 'recoverRunningVersion()'. Additionally, a property that is a running version will resolve all functions prior to returning it's property value. A non-running version property will return functions as their uncompiled string representation.
      Specified by:
        `setRunningVersion` in interface `JMeterProperty`
      Overrides:
        `setRunningVersion` in class `MultiProperty`
      Parameters:
        `running` - flag whether this property is a running version

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