org.apache.jmeter.testelement.property

Class CollectionProperty

Implemented Interfaces:
Cloneable, Comparable, JMeterProperty, Serializable

public class CollectionProperty
extends MultiProperty

Field Summary

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

log

Constructor Summary

CollectionProperty()
CollectionProperty(String name, Collection value)

Method Summary

void
addItem(Object item)
void
addProperty(JMeterProperty prop)
Easy way to add properties to the list.
void
clear()
Clear away all values in the property.
Object
clone()
boolean
equals(Object o)
Determines if the two objects are equal by comparing names and values
JMeterProperty
get(int row)
Object
getObjectValue()
protected Class
getPropertyType()
Figures out what kind of properties this collection is holding and returns the class type.
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
remove(String prop)
void
remove(int index)
void
set(int index, String prop)
void
set(int index, JMeterProperty prop)
void
setCollection(Collection coll)
void
setObjectValue(Object v)
void
setRunningVersion(boolean running)
Make the property a running version or turn it off as the running version.
int
size()

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

addProperty, clear, iterator, mergeIn, recoverRunningVersionOfSubElements, setRunningVersion

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

clone, compareTo, convertObject, createProperty, equals, getBlankProperty, getBlankProperty, getBooleanValue, getDoubleValue, getFloatValue, getIntValue, getIterator, getLongValue, getName, getPropertyType, hashCode, isEqualType, isRunningVersion, makeProperty, mergeIn, normalizeList, normalizeMap, setName, setRunningVersion, toString

Constructor Details

CollectionProperty

public CollectionProperty()

CollectionProperty

public CollectionProperty(String name,
                          Collection value)

Method Details

addItem

public void addItem(Object item)

addProperty

public void addProperty(JMeterProperty prop)
Easy way to add properties to the list.
Overrides:
addProperty in interface MultiProperty
Parameters:
prop -

clear

public void clear()
Clear away all values in the property.
Overrides:
clear in interface MultiProperty

clone

public Object clone()
Specified by:
clone in interface JMeterProperty
Overrides:
clone in interface AbstractProperty

equals

public boolean equals(Object o)
Determines if the two objects are equal by comparing names and values
Overrides:
equals in interface AbstractProperty
Returns:
true if names are equal and values are equal (or both null)

get

public JMeterProperty get(int row)

getObjectValue

public Object getObjectValue()
Specified by:
getObjectValue in interface JMeterProperty

getPropertyType

protected Class getPropertyType()
Figures out what kind of properties this collection is holding and returns the class type.
Overrides:
getPropertyType in interface AbstractProperty

getStringValue

public String getStringValue()
Specified by:
getStringValue in interface JMeterProperty

hashCode

public int hashCode()
Overrides:
hashCode in interface AbstractProperty

iterator

public PropertyIterator iterator()
Get the property iterator to iterate through the sub-values of this JMeterProperty.
Overrides:
iterator in interface MultiProperty
Returns:
an iterator for the sub-values of this property

recoverRunningVersion

public void recoverRunningVersion(TestElement owner)
Tell the property to revert to the state at the time setRunningVersion(true) was called.
Specified by:
recoverRunningVersion in interface JMeterProperty

remove

public void remove(String prop)

remove

public void remove(int index)

set

public void set(int index,
                String prop)

set

public void set(int index,
                JMeterProperty prop)

setCollection

public void setCollection(Collection coll)

setObjectValue

public void setObjectValue(Object v)
Specified by:
setObjectValue in interface JMeterProperty

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 interface MultiProperty
Parameters:

size

public int size()

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