Class CollectionProperty
- java.lang.Object
-
- org.apache.jmeter.testelement.property.AbstractProperty
-
- org.apache.jmeter.testelement.property.MultiProperty
-
- org.apache.jmeter.testelement.property.CollectionProperty
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<JMeterProperty>,JMeterProperty
public class CollectionProperty extends MultiProperty
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.jmeter.testelement.property.AbstractProperty
log
-
-
Constructor Summary
Constructors Constructor Description CollectionProperty()CollectionProperty(String name, Collection<?> value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddItem(Object item)voidaddProperty(JMeterProperty prop)Add a property to the collection.voidclear()Clear away all values in the property.CollectionPropertyclone()booleanequals(Object o)Determines if the two objects are equal by comparing names and valuesJMeterPropertyget(int row)ObjectgetObjectValue()protected Class<? extends JMeterProperty>getPropertyType()Figures out what kind of properties this collection is holding and returns the class type.StringgetStringValue()inthashCode()PropertyIteratoriterator()Get the property iterator to iterate through the sub-values of this JMeterProperty.voidrecoverRunningVersion(TestElement owner)Tell the property to revert to the state at the time setRunningVersion(true) was called.voidremove(int index)voidremove(String prop)voidset(int index, String prop)voidset(int index, JMeterProperty prop)voidsetCollection(Collection<?> coll)voidsetObjectValue(Object v)voidsetRunningVersion(boolean running)Make the property a running version or turn it off as the running version.intsize()-
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
-
-
-
-
Constructor Detail
-
CollectionProperty
public CollectionProperty(String name, Collection<?> value)
-
CollectionProperty
public CollectionProperty()
-
-
Method Detail
-
equals
public boolean equals(Object o)
Description copied from class:AbstractPropertyDetermines if the two objects are equal by comparing names and values- Overrides:
equalsin classAbstractProperty- Returns:
- true if names are equal and values are equal (or both null)
-
hashCode
public int hashCode()
Description copied from class:AbstractProperty- Overrides:
hashCodein classAbstractProperty
-
remove
public void remove(String prop)
-
set
public void set(int index, String prop)
-
set
public void set(int index, JMeterProperty prop)
-
get
public JMeterProperty get(int row)
-
remove
public void remove(int index)
-
setObjectValue
public void setObjectValue(Object v)
-
iterator
public PropertyIterator iterator()
Get the property iterator to iterate through the sub-values of this JMeterProperty.- Specified by:
iteratorin classMultiProperty- Returns:
- an iterator for the sub-values of this property
-
getStringValue
public String getStringValue()
-
getObjectValue
public Object getObjectValue()
-
size
public int size()
-
clone
public CollectionProperty clone()
- Specified by:
clonein interfaceJMeterProperty- Overrides:
clonein classAbstractProperty
-
setCollection
public void setCollection(Collection<?> coll)
-
clear
public void clear()
Clear away all values in the property.- Specified by:
clearin classMultiProperty
-
addProperty
public void addProperty(JMeterProperty prop)
Add a property to the collection.- Specified by:
addPropertyin classMultiProperty- Parameters:
prop- theJMeterPropertyto add
-
addItem
public void addItem(Object item)
-
getPropertyType
protected Class<? extends JMeterProperty> getPropertyType()
Figures out what kind of properties this collection is holding and returns the class type.- Overrides:
getPropertyTypein classAbstractProperty- Returns:
- property type of this property
- See Also:
AbstractProperty.getPropertyType()
-
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
-
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:
setRunningVersionin interfaceJMeterProperty- Overrides:
setRunningVersionin classMultiProperty- Parameters:
running- flag whether this property is a running version
-
-