Class AbstractProperty
java.lang.Object
org.apache.jmeter.testelement.property.AbstractProperty
- All Implemented Interfaces:
- Serializable,- Cloneable,- Comparable<JMeterProperty>,- JMeterProperty
- Direct Known Subclasses:
- BooleanProperty,- FunctionProperty,- MultiProperty,- NullProperty,- NumberProperty,- ObjectProperty,- StringProperty
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionclone()intcompareTo(JMeterProperty arg0) Compares two JMeterProperty object values.protected JMeterPropertyconvertObject(Object item) static JMeterPropertycreateProperty(Object item) booleanDetermines if the two objects are equal by comparing names and valuesprotected JMeterPropertyprotected static JMeterPropertygetBlankProperty(Object item) booleanReturns false if string is invalid or null.doubleReturns 0 if string is invalid or null.floatReturns 0 if string is invalid or null.intReturns 0 if string is invalid or null.protected PropertyIteratorgetIterator(Collection<JMeterProperty> values) longReturns 0 if string is invalid or null.getName()The name of the property.protected Class<? extends JMeterProperty>Get the property type for this property.inthashCode()protected booleanisEqualType(JMeterProperty prop) booleanReturns whether the property is a running version.protected static JMeterPropertymakeProperty(Object item) Create a JMeterProperty from an object.voidmergeIn(JMeterProperty prop) Take the given property object and merge it's value with the current property object.protected Collection<JMeterProperty>normalizeList(Collection<?> coll) Convert a collection of objects into JMeterProperty objects.protected Map<String,JMeterProperty> normalizeMap(Map<?, ?> coll) Given a Map, it converts the Map into a collection of JMeterProperty objects, appropriate for a MapProperty object.voidSet the property name.voidsetRunningVersion(boolean runningVersion) Make the property a running version or turn it off as the running version.toString()Provides the string representation of the property.Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.jmeter.testelement.property.JMeterPropertygetObjectValue, getStringValue, recoverRunningVersion, setObjectValue
- 
Field Details- 
logprotected static final org.slf4j.Logger log
 
- 
- 
Constructor Details- 
AbstractProperty
- 
AbstractPropertyprotected AbstractProperty()
 
- 
- 
Method Details- 
isEqualType
- 
isRunningVersionpublic boolean isRunningVersion()Returns whether the property is a running version.- Specified by:
- isRunningVersionin interface- JMeterProperty
- Returns:
- flag whether this property is a running version
 
- 
getNameThe name of the property. Typically this should match the name that keys the property's location in the test elements Map.- Specified by:
- getNamein interface- JMeterProperty
- Returns:
- the name of the property
 
- 
setNameSet the property name.- Specified by:
- setNamein interface- JMeterProperty
- Parameters:
- name- the name of the property
 
- 
setRunningVersionpublic 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:
- setRunningVersionin interface- JMeterProperty
- Parameters:
- runningVersion- flag whether this property is a running version
 
- 
getIterator
- 
clone- Specified by:
- clonein interface- JMeterProperty
- Overrides:
- clonein class- Object
 
- 
getIntValuepublic int getIntValue()Returns 0 if string is invalid or null.- Specified by:
- getIntValuein interface- JMeterProperty
- See Also:
 
- 
getLongValuepublic long getLongValue()Returns 0 if string is invalid or null.- Specified by:
- getLongValuein interface- JMeterProperty
- See Also:
 
- 
getDoubleValuepublic double getDoubleValue()Returns 0 if string is invalid or null.- Specified by:
- getDoubleValuein interface- JMeterProperty
- See Also:
 
- 
getFloatValuepublic float getFloatValue()Returns 0 if string is invalid or null.- Specified by:
- getFloatValuein interface- JMeterProperty
- See Also:
 
- 
getBooleanValuepublic boolean getBooleanValue()Returns false if string is invalid or null.- Specified by:
- getBooleanValuein interface- JMeterProperty
- See Also:
 
- 
equalsDetermines if the two objects are equal by comparing names and values
- 
hashCodepublic int hashCode()
- 
compareToCompares two JMeterProperty object values. N.B. Does not compare names- Specified by:
- compareToin interface- Comparable<JMeterProperty>
- Parameters:
- arg0- JMeterProperty to compare against
- Returns:
- 0 if equal values or both values null; -1 otherwise
- See Also:
 
- 
getPropertyTypeGet the property type for this property. Used to convert raw values into JMeterProperties.- Returns:
- property type of this property
 
- 
getBlankProperty
- 
getBlankProperty
- 
normalizeListConvert a collection of objects into JMeterProperty objects.- Parameters:
- coll- Collection of any type of object
- Returns:
- Collection of JMeterProperty objects
 
- 
normalizeMapGiven a Map, it converts the Map into a collection of JMeterProperty objects, appropriate for a MapProperty object.- Parameters:
- coll- Map to convert
- Returns:
- converted Map
 
- 
createProperty
- 
makePropertyCreate a JMeterProperty from an object. The object can be one of:- JMeterProperty - returned unchanged
- TestElement => TestElementProperty with the same name
- Map|Collection => Map|CollectionProperty with the name = item.hashCode
 - Parameters:
- item- object to be turned into a property
- Returns:
- the JMeterProperty
 
- 
convertObject
- 
toStringProvides the string representation of the property.
- 
mergeInTake the given property object and merge it's value with the current property object. For most property types, this will simply be ignored. But for collection properties and test element properties, more complex behavior is required.- Specified by:
- mergeInin interface- JMeterProperty
- Parameters:
- prop- the property object to merge into this property
 
 
-