|
IBM Rational Functional Tester Version 8.1.1000 IBM Rational Functional Tester API Reference Project Version 2.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.rational.test.ft.script.WeightedPropertySet
public class WeightedPropertySet
Represents a set of recognition properties in encapsulated values. These properties are: property
(property name), value
, and weight
. The property name is a case-sensitive
String
value that the TestObject
accepts as a property name. The value is a java.lang.Object
object associated with a specific property name. The value must be a
value class
so that it
can be properly copied to the software under test. The weight is a value in the range MIN_WEIGHT
to
MAX_WEIGHT
. Specifying a weight outside this range causes an exception to be raised.
WeightedProperty
Field Summary | |
---|---|
static int |
MAX_WEIGHT
Supplied as a convienence so that WeightedProperty.MAX_WEIGHT can be accessed without having to import the WeightedProperty class. |
static int |
MIN_WEIGHT
Supplied as a convienence so that WeightedProperty.MIN_WEIGHT can be accessed without having to import the WeightedProperty class. |
Constructor Summary | |
---|---|
WeightedPropertySet()
Creates an empty property set. |
|
WeightedPropertySet(java.util.Hashtable properties, int weight)
Creates a property set containing the specified set of property key/value pairs, all with the same weight associated with them. |
Method Summary | |
---|---|
void |
add(java.lang.String property, java.lang.Object value)
Adds the supplied property name and attributes to the current set. |
void |
add(java.lang.String property, java.lang.Object value, int weight)
Adds the supplied property name and attributes to the current set. |
void |
add(WeightedProperty property)
Adds the supplied property to the current set. |
boolean |
contains(java.lang.String property)
Returns true if the specified property name is
represented in this set. |
boolean |
equals(java.lang.Object o)
Compares each member of this set with those in the supplied set. |
WeightedProperty |
get(java.lang.String property)
Returns the attributes that constitute the supplied property . |
java.util.Enumeration |
getProperties()
Returns an Enumeration object for the properties that make up this set. |
int |
getSize()
Returns the number of elements in the set. |
void |
remove(java.lang.String property)
Removes the specified property from the active set. |
void |
removeAll()
Removes all properties from this set. |
java.lang.String |
toString()
Returns a textual representation of the properties that make up this set. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MIN_WEIGHT
WeightedProperty.MIN_WEIGHT
can be accessed without having to import the WeightedProperty
class.
public static final int MAX_WEIGHT
WeightedProperty.MAX_WEIGHT
can be accessed without having to import the WeightedProperty
class.
Constructor Detail |
---|
public WeightedPropertySet()
public WeightedPropertySet(java.util.Hashtable properties, int weight)
weight
associated with them. All of the keys in the supplied properties
table must be java.lang.String
objects. The supplied weight
must be in the range MIN_WEIGHT
to MAX_WEIGHT
, or an exception is thrown.
Method Detail |
---|
public boolean contains(java.lang.String property)
true
if the specified property
name is
represented in this set.
property
- the property name to be located in this setpublic void add(java.lang.String property, java.lang.Object value, int weight)
property
name and attributes to the current set.
If the property
name is already located in the set, the supplied attributes
replace those already in the set. The supplied weight
must be in the range MIN_WEIGHT
to MAX_WEIGHT
, or an exception is thrown.
property
- the name of the property being added to this setvalue
- the value attribute associated with the property nameweight
- the weight attribute associated with the property namepublic void add(java.lang.String property, java.lang.Object value)
property
name and attributes to the current set.
If the property
name is already located in the set, the supplied attributes
replace those already in the set. The implied weight associated with this property is MAX_WEIGHT
.
property
- The name of the property being added to this setvalue
- The value attribute associated with the property namepublic void add(WeightedProperty property)
property
to the current set. If the property
name is already located in the set, the supplied property
replaces the attributes already in the set.
property
- the property to add to the current setpublic void remove(java.lang.String property)
property
from the active set. If the
specified property
is not found, no action is performed.
property
- the name of the property to be removed from the current setpublic void removeAll()
public java.util.Enumeration getProperties()
Enumeration
object for the properties that make up this set. Each element in the enumeration is a WeightedProperty
object.
public WeightedProperty get(java.lang.String property)
property
.
A null
value is returned if the property name is not found in the set.
property
- The name of the desired propertypublic int getSize()
public java.lang.String toString()
toString
method.
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
method.
equals
in class java.lang.Object
o
- the right side of the set comparision
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |