IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.script
Class WeightedProperty

java.lang.Object   extended by com.rational.test.ft.script.WeightedProperty

public class WeightedProperty
extends java.lang.Object

Defines a standard property name plus a value pair with an additional weight attribute. The property name is a unique String that a TestObject understands and can associate a particular value with. The weight attribute is a value in the range of MIN_WEIGHT to MAX_WEIGHT that defines the relative importance of this property to the associated TestObject. A weight of MIN_WEIGHT, that is, zero means that the property has no importance, while a weight of MAX_WEIGHT implies that the property is very important. Weights between these values indicate the relative importance of the property.

Since:
RFT1.0

Field Summary
static int MAX_WEIGHT
          Defines the maximum value that can be assigned to a weight attribute.
static int MIN_WEIGHT
          Defines the minimum value that can be assigned to a weight attribute.
 
Constructor Summary
WeightedProperty(java.lang.String property, java.lang.Object value, int weight)
          Builds a Property (name, value, weight) object.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares the property's name and value attributes to the supplied object's attributes.
 java.lang.String getProperty()
          Returns the property name attribute associated with this object.
 java.lang.Object getValue()
          Returns the property value attribute associated with this object.
 int getWeight()
          Returns the property weight attribute associated with this object.
 java.lang.String toString()
          Returns a textual representation of the attributes that make up this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_WEIGHT

public static final int MIN_WEIGHT
Defines the minimum value that can be assigned to a weight attribute. This value is zero (0).

Since:
RFT1.0
See Also:
Constant Field Values

MAX_WEIGHT

public static final int MAX_WEIGHT
Defines the maximum value that can be assigned to a weight attribute. This value is one hundred (100).

Since:
RFT1.0
See Also:
Constant Field Values
Constructor Detail

WeightedProperty

public WeightedProperty(java.lang.String property,                         java.lang.Object value,                         int weight)
Builds a Property (name, value, weight) object. A semantic restriction is enforced in this constructor to ensure that the >weight> value is in the range MIN_WEIGHT to MAX_WEIGHT. weight values outside this range cause an appropriate exception to be thrown.

Since:
RFT1.0
Method Detail

getProperty

public java.lang.String getProperty()
Returns the property name attribute associated with this object.

Since:
RFT1.0

getValue

public java.lang.Object getValue()
Returns the property value attribute associated with this object.

Since:
RFT1.0

getWeight

public int getWeight()
Returns the property weight attribute associated with this object. The weight is in the range MIN_WEIGHT to MAX_WEIGHT.

Since:
RFT1.0

equals

public boolean equals(java.lang.Object o)
Compares the property's name and value attributes to the supplied object's attributes. The method returns true if the specified object's name equals the active name and if the associated values are also equal. If the supplied object is not a WeightedProperty, the method returns false.

Overrides:
equals in class java.lang.Object
Parameters:
o - the right side of the object comparison
Since:
RFT1.0

toString

public java.lang.String toString()
Returns a textual representation of the attributes that make up this object. This method overrides the inherited toString method.

Overrides:
toString in class java.lang.Object
Since:
RFT1.0