public interface HashTableDriverInterface
| Modifier and Type | Interface and Description |
|---|---|
static class |
HashTableDriverInterface.TestType
This
enum is used to specify which test scenario will be executed. |
| Modifier and Type | Method and Description |
|---|---|
LinkedList<Person<java.lang.Integer>,java.lang.Integer>[] |
createBuckets(int numBuckets)
This method creates the buckets that are needed for the
HashTable<Person<Integer>, Integer>. |
HashTable<Person<java.lang.Integer>,java.lang.Integer> |
createHashTable(HashTableDriverInterface.TestType testType,
int numPeople)
This method is used to create a
HashTable<Person<Integer>, Integer>
for the specified testType. |
Person<java.lang.Integer>[] |
createPersons(int numPeople)
This method is used to create array with the
specified number of
Person<Integer> instances. |
java.lang.Object[] |
runTestCase(HashTableDriverInterface.TestType testType,
int numPeople,
int numberOfTimes)
This method is called to run a particular testType on a HashTable for the specified
numberOfTimes.
|
Person<java.lang.Integer>[] createPersons(int numPeople)
Person<Integer> instances.numPeople - The number of Person<Integer> instances to create.Person<Integer> with the
specified number of Person<Integer> instances.LinkedList<Person<java.lang.Integer>,java.lang.Integer>[] createBuckets(int numBuckets)
HashTable<Person<Integer>, Integer>.numBuckets - The number of buckets needed for the HashTable<Person<Integer>, Integer>.LinkedList<Person<Integer>, Integer$gt; containing the specified number
of LinkedList<Person<Integer>, Integer$gt; instances.HashTable<Person<java.lang.Integer>,java.lang.Integer> createHashTable(HashTableDriverInterface.TestType testType, int numPeople)
HashTable<Person<Integer>, Integer>
for the specified testType.testType - The type of test for the created HashTable.
Person<Integer> instances.
Person<Integer> instances.
numPeople - The number of Person<Integer> instances to include in
the returned HashTable.HashTable<Person<Integer>, Integer>
containing the specified number of Person<Integer> instancesjava.lang.Object[] runTestCase(HashTableDriverInterface.TestType testType, int numPeople, int numberOfTimes)
This method is called to run a particular testType on a HashTable for the specified numberOfTimes.
This method repeats the following numberOfTimes:
testType - The test type to be run.numPeople - The number of Person<Integer> instances to include
in the test.numberOfTimes - The type of test case being run. See the enum HashTableDriverInterface.TestType.