All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class guinea.logic.NewGenericItem

java.lang.Object
   |
   +----guinea.logic.Item
           |
           +----guinea.logic.NewGenericItem

public class NewGenericItem
extends Item
A new generic test item. Item's parameters parameter defines the list of parameter names for this item.


Variable Index

· paramnames
Array of parameter names that are used in this item.
· paramRequired
Array of booleans that determine whether a parameter is required to have a value.
· paramvalues
Array of parameter values.

Constructor Index

· NewGenericItem()
Construct a new generic test item.

Method Index

· clone()
Clone the item object.
· getParameter(String)
Get a parameter by name.
· getParameterNames()
Get a list of parameter names of this item.
· getTemplateCopy()
Get a copy of this item used as a template.
· isParameterRequired(String)
Test whether the given parameter is a required one.
· propertyLoad(Properties, String)
Load information from properties to this item.
· propertySave(ExtProperties)
Saves item's information to properties.
· setParameter(String, Object)
Set value of a parameter.
· setParameterNames(String[])
· setRequiredParameters(String[])
Assign given parameters to require values.
· toString()
Get the string representation of the object.

Variables

· paramnames
 protected String paramnames[]
Array of parameter names that are used in this item.

· paramvalues
 protected Object paramvalues[]
Array of parameter values.

· paramRequired
 protected boolean paramRequired[]
Array of booleans that determine whether a parameter is required to have a value. If the array is null, all parameters require a value.

Constructors

· NewGenericItem
 public NewGenericItem()
Construct a new generic test item.

Methods

· setParameterNames
 public void setParameterNames(String names[])
· getParameterNames
 public String[] getParameterNames()
Get a list of parameter names of this item.

Returns:
An array of parameter names.
Overrides:
getParameterNames in class Item
· getParameter
 public Object getParameter(String pname)
Get a parameter by name. Parameter name can be "A" or "B" to get the A and B samples respectively.

Parameters:
pname - name of parameter
Returns:
returns value of parameter or null if not found
Overrides:
getParameter in class Item
· setParameter
 public void setParameter(String pname,
                          Object value)
Set value of a parameter.

Parameters:
pname - Name of the parameter.
value - Value of the parameter.
Overrides:
setParameter in class Item
· toString
 public String toString()
Get the string representation of the object.

Overrides:
toString in class Object
· clone
 public Object clone()
Clone the item object.

Returns:
A clone of the item.
Overrides:
clone in class Item
· getTemplateCopy
 public Item getTemplateCopy()
Get a copy of this item used as a template. This is same as clone() except that a copied item is not a template and its template is set to this template object. This method is used when loading test items from file.

Returns:
A copy of an item.
Overrides:
getTemplateCopy in class Item
· isParameterRequired
 public boolean isParameterRequired(String name)
Test whether the given parameter is a required one.

Parameters:
name - The name of the parameter.
Returns:
true if the parameter is required.
· setRequiredParameters
 public void setRequiredParameters(String pnames[])
Assign given parameters to require values.

Parameters:
pnames - An array of parameter names that require values.
· propertyLoad
 public void propertyLoad(Properties p,
                          String name) throws IllegalArgumentException
Load information from properties to this item.

Overrides:
propertyLoad in class Item
· propertySave
 public void propertySave(ExtProperties p)
Saves item's information to properties.

Parameters:
p - where to save information.
Overrides:
propertySave in class Item

All Packages  Class Hierarchy  This Package  Previous  Next  Index