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
-
BAD_L
- A bad locator, bad key.
-
L_BAD
- a bad Locator, bad container
-
MT_KBC
- An empty KBC.
-
ONE_TEN
- A ten locator KBC.
-
RANDOM
-
A random KBC
-
RND_L
- A random, uncontained Locator
-
KBCFactory(String)
- The constructor of this factory takes the fully qualified name of the
class of the
Dictionary
-
generate(int, int)
- Generates a data structure based on the type and position key.
-
init(String)
-
-
location(int)
- Returns the current container and a new location for that container
-
randomKBC(int)
-
-
setContainer(Object)
- Sets the current container of the factory, so that the factory can
generate locations like Position and Locator
MT_KBC
public static final int MT_KBC
- An empty KBC.
ONE_TEN
public static final int ONE_TEN
- A ten locator KBC.
RND_L
public static final int RND_L
- A random, uncontained Locator
BAD_L
public static final int BAD_L
- A bad locator, bad key.
L_BAD
public static final int L_BAD
- a bad Locator, bad container
RANDOM
public static final int RANDOM
- A random KBC
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.
init
public void init(String arguments)
generate
public TestStructure generate(int structure,
int location)
- Generates a data structure based on the type and position key.
- Overrides:
- generate in class GenericFactory
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
location
public TestStructure location(int location)
- Returns the current container and a new location for that container
- Overrides:
- location in class GenericFactory
randomKBC
public KeyBasedContainer randomKBC(int size)
All Packages Class Hierarchy This Package Previous Next Index