All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jdsltools.testers.pqtester.PriorityQFactory

java.lang.Object
   |
   +----jdsltools.testers.GenericFactory
           |
           +----jdsltools.testers.pqtester.PriorityQFactory

public class PriorityQFactory
extends GenericFactory
Builds PriorityQueues. MT_PQ Empty priority queue ONE_TEN PQ with ten elements in it with keys 1-10 ONE_TEN Also represents the ten locators RND_L Locator with a random key and element BAD_L HeapLocator with a bad key L_BAD HeapLocator with a bad container THREE Locator with a key of 3

Author:
Marco da Silva (mds)

Variable Index

 o BAD_L
 o L_BAD
 o MT_PQ
 o ONE_TEN
 o RND_L
 o THREE

Constructor Index

 o PriorityQFactory(String)
The constructor of this factory takes the fully qualified name of the class of the PriorityQueue
 o PriorityQFactory(String, String)

Method Index

 o generate(int, int)
Generates a data structure based on the type and position key.
 o init(String)
call to avoid null pointer exceptions, creates structures that take parameters.
 o location(int)
Returns the current container and a new location for that container
 o makeALocator(int)
 o setContainer(Object)
Returns the current container.

Variables

 o MT_PQ
 public static final int MT_PQ
 o RND_L
 public static final int RND_L
 o BAD_L
 public static final int BAD_L
 o L_BAD
 public static final int L_BAD
 o THREE
 public static final int THREE
 o ONE_TEN
 public static final int ONE_TEN

Constructors

 o PriorityQFactory
 public PriorityQFactory(String structToBuild)
The constructor of this factory takes the fully qualified name of the class of the PriorityQueue

Parameters:
structToBuild - The fully qualified name of the class to build.
 o PriorityQFactory
 public PriorityQFactory(String structToBuild,
                         String arguments)

Methods

 o init
 public void init(String arguments)
call to avoid null pointer exceptions, creates structures that take parameters.

 o generate
 public TestStructure generate(int structure,
                               int location)
Generates a data structure based on the type and position key.

Overrides:
generate in class GenericFactory
 o setContainer
 public void setContainer(Object container)
Returns the current container.

Overrides:
setContainer in class GenericFactory
 o location
 public TestStructure location(int location)
Returns the current container and a new location for that container

Overrides:
location in class GenericFactory
 o makeALocator
 public Locator makeALocator(int key)

All Packages  Class Hierarchy  This Package  Previous  Next  Index