org.apache.jmeter.testelement.property

## Class FloatProperty

- java.lang.Object
- - org.apache.jmeter.testelement.property.AbstractProperty
  - - org.apache.jmeter.testelement.property.NumberProperty
    - - org.apache.jmeter.testelement.property.FloatProperty

- All Implemented Interfaces:
    Serializable, Cloneable, Comparable<JMeterProperty>, JMeterProperty

      public class FloatProperty
      extends NumberProperty

  See Also:
    Serialized Form

- - ### Field Summary

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

      `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FloatProperty()`
    `FloatProperty(String name, float value)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FloatProperty` | `clone()`
    `boolean` | `getBooleanValue()` Returns false if string is invalid or null.
    `double` | `getDoubleValue()` Returns 0 if string is invalid or null.
    `float` | `getFloatValue()` Returns 0 if string is invalid or null.
    `int` | `getIntValue()` Returns 0 if string is invalid or null.
    `long` | `getLongValue()` Returns 0 if string is invalid or null.
    `Object` | `getObjectValue()`
    `String` | `getStringValue()`
    `void` | `recoverRunningVersion(TestElement owner)` Tell the property to revert to the state at the time setRunningVersion(true) was called.
    `protected void` | `setNumberValue(Number n)` Set the value of the property with a Number object.
    `protected void` | `setNumberValue(String n)` Set the value of the property with a String object.
    `void` | `setRunningVersion(boolean runningVersion)` Make the property a running version or turn it off as the running version.
    `void` | `setValue(float value)`

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

      `compareTo, setObjectValue`

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

      `convertObject, createProperty, equals, getBlankProperty, getBlankProperty, getIterator, getName, getPropertyType, hashCode, isEqualType, isRunningVersion, makeProperty, mergeIn, normalizeList, normalizeMap, setName, toString`

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

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

- - ### Constructor Detail

    - #### FloatProperty

          public FloatProperty(String name,
                               float value)

    - #### FloatProperty

          public FloatProperty()

  - ### Method Detail

    - #### setRunningVersion

          public void setRunningVersion(boolean runningVersion)

      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 `AbstractProperty`
      Parameters:
        `runningVersion` - flag whether this property is a running version

    - #### 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

    - #### setValue

          public void setValue(float value)

    - #### setNumberValue

          protected void setNumberValue(Number n)

      Set the value of the property with a Number object.
      Specified by:
        `setNumberValue` in class `NumberProperty`
      Parameters:
        `n` - the value to set

    - #### setNumberValue

          protected void setNumberValue(String n)
                                 throws NumberFormatException

      Set the value of the property with a String object.
      Specified by:
        `setNumberValue` in class `NumberProperty`
      Parameters:
        `n` - the number to set as a string representation
      Throws:
        `NumberFormatException` - if the number `n` can not be converted to a `Number`

    - #### getStringValue

          public String getStringValue()

    - #### getObjectValue

          public Object getObjectValue()

    - #### clone

          public FloatProperty clone()

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

    - #### getBooleanValue

          public boolean getBooleanValue()

      Returns false if string is invalid or null.
      Specified by:
        `getBooleanValue` in interface `JMeterProperty`
      Overrides:
        `getBooleanValue` in class `AbstractProperty`
      See Also:
        `JMeterProperty.getBooleanValue()`

    - #### getDoubleValue

          public double getDoubleValue()

      Returns 0 if string is invalid or null.
      Specified by:
        `getDoubleValue` in interface `JMeterProperty`
      Overrides:
        `getDoubleValue` in class `AbstractProperty`
      See Also:
        `JMeterProperty.getDoubleValue()`

    - #### getFloatValue

          public float getFloatValue()

      Returns 0 if string is invalid or null.
      Specified by:
        `getFloatValue` in interface `JMeterProperty`
      Overrides:
        `getFloatValue` in class `AbstractProperty`
      See Also:
        `JMeterProperty.getFloatValue()`

    - #### getIntValue

          public int getIntValue()

      Returns 0 if string is invalid or null.
      Specified by:
        `getIntValue` in interface `JMeterProperty`
      Overrides:
        `getIntValue` in class `AbstractProperty`
      See Also:
        `JMeterProperty.getIntValue()`

    - #### getLongValue

          public long getLongValue()

      Returns 0 if string is invalid or null.
      Specified by:
        `getLongValue` in interface `JMeterProperty`
      Overrides:
        `getLongValue` in class `AbstractProperty`
      See Also:
        `JMeterProperty.getLongValue()`

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