All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface jdsltools.testers.Factory

public interface Factory

Variable Index

 o NO_LOCATION
The default value that represents no location in a call to generate.

Method Index

 o generate(int, int)
Generates a data structure based on the type and position key.
 o location(int)
Returns the current container and a new location for that container
 o setContainer(Object)
Sets the current container of the factory, so that the factory can generate locations like Position and Locator

Variables

 o NO_LOCATION
 public static final int NO_LOCATION
The default value that represents no location in a call to generate. It may be changed in an implementation.

Methods

 o generate
 public abstract TestStructure generate(int structure,
                                        int location)
Generates a data structure based on the type and position key. It returns a pair of objects. One is the structure itself, which is in the particular configuration dictated by the parameter structure. The other object is the location object, dictated by the parameter location. This location may be a position, a locator, or anything else that should be passed into the method, and varies according to the configuration of the structure. This method should also be used to generate invalid Positions, Locators, or other wrapper classes by defining a key to pass into location.

Parameters:
structure - The key that represents the type of data structure that the user wants to create. If the key corresponds to multiple containers, these containers should be packed into an array.
location - The key that represents the location that should be paired with this data structure. If this location corresponds to multiple locations, then those locations should be packed into an array.
Returns:
a structure/location pair. structure or the location does not correspond to a configuration that this factory can create.
 o setContainer
 public abstract void setContainer(Object container)
Sets the current container of the factory, so that the factory can generate locations like Position and Locator

Parameters:
container - The container to be set as the current container
 o location
 public abstract TestStructure location(int location)
Returns the current container and a new location for that container

Parameters:
location - The key that represents which location to generate
Returns:
a structure/location pair doesn't correspond to a location the factory can create.

All Packages  Class Hierarchy  This Package  Previous  Next  Index