All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jdsltools.testers.KBCFactory

java.lang.Object
   |
   +----jdsltools.testers.GenericFactory
           |
           +----jdsltools.testers.KBCFactory

public class KBCFactory
extends GenericFactory
Builds KeyBasedContainers, which also implement the ComparatorBased interface and store locators. MT_KBC: represents an empty KeyBasedContainer; ONE_TEN: KBC with ten elements in it, with keys 1-10; RANDOM: generates a random tree. Instead of passing in a location, pass in the size of the random container, all Locators will be returned. ONE_TEN: also represents the ten locators in the ONE_TEN test structure; RND_L: locator with random key and element and no container; BAD_L: locator with a bad key; L_BAD: Locator with bad container

Author:
Marco da Silva

Variable Index

 o BAD_L
A bad locator, bad key.
 o L_BAD
a bad Locator, bad container
 o MT_KBC
An empty KBC.
 o ONE_TEN
A ten locator KBC.
 o RANDOM
A random KBC
 o RND_L
A random, uncontained Locator

Constructor Index

 o KBCFactory(String)
The constructor of this factory takes the fully qualified name of the class of the Dictionary

Method Index

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

Variables

 o MT_KBC
 public static final int MT_KBC
An empty KBC.

 o ONE_TEN
 public static final int ONE_TEN
A ten locator KBC.

 o RND_L
 public static final int RND_L
A random, uncontained Locator

 o BAD_L
 public static final int BAD_L
A bad locator, bad key.

 o L_BAD
 public static final int L_BAD
a bad Locator, bad container

 o RANDOM
 public static final int RANDOM
A random KBC

Constructors

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

Parameters:
structToBuild - The fully qualified name of the class to build.

Methods

 o init
 public void init(String arguments)
 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)
Sets the current container of the factory, so that the factory can generate locations like Position and Locator

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 randomKBC
 public KeyBasedContainer randomKBC(int size)

All Packages  Class Hierarchy  This Package  Previous  Next  Index