|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDriver
public class Driver
Nested Class Summary | |
---|---|
static class |
Driver.QueueType
The QueueType enum has the following values:
ArrayBasedQueue
ReferenceBasedQueue
|
static class |
Driver.TestType
The TestType enum has the following values:
AddIntegers
RemoveIntegers
AddAndDisplayStrings
DisplayAndRemoveStrings
|
Constructor Summary | |
---|---|
Driver()
|
Method Summary | |
---|---|
static void |
clearRunTimes()
This method clears the array of run times to all zeros |
static QueueInterface<java.lang.Integer> |
createIntegerTestQueue(Driver.QueueType queueType,
int firstNumber,
int lastNumber)
This method is called by the runTestCase() method to obtain an Integer test queue. |
static QueueInterface<java.lang.String> |
createStringTestQueue(Driver.QueueType queueType,
int firstString,
int lastString)
This method is called by the runTestCase() method to obtain an Integer test queue. |
static long[] |
getRunTimes()
This method returns the array of run times that was generated by the previous call to runTestCase() |
static QueueInterface<java.lang.Integer> |
initializeIntegerTestQueue(QueueInterface<java.lang.Integer> testQueue,
int firstNumber,
int lastNumber)
This method is called by the createIntegerTestQueue() method to initialize the test queue. |
static QueueInterface<java.lang.String> |
initializeStringTestQueue(QueueInterface<java.lang.String> testQueue,
int firstString,
int lastString)
This method is called by the createStringTestQueue() method to initialize the test queue. |
static void |
main(java.lang.String[] args)
|
static void |
runTestCase(Driver.TestType testType,
Driver.QueueType queueType)
This method is called to run a particular test case on a queue type a total of ten times. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Driver()
Method Detail |
---|
public static long[] getRunTimes()
runTestCase()
public static void clearRunTimes()
public static QueueInterface<java.lang.Integer> initializeIntegerTestQueue(QueueInterface<java.lang.Integer> testQueue, int firstNumber, int lastNumber)
testQueue
- The testQueue to be initialized.firstNumber
- The first number to be added to the queue.lastNumber
- The last number to be added to the queue.
createIntegerTestQueue(Driver.QueueType, int, int)
public static QueueInterface<java.lang.Integer> createIntegerTestQueue(Driver.QueueType queueType, int firstNumber, int lastNumber)
queueType
- The type of queue needed. This can either be an ArrayQueue or a LinkedQueue.firstNumber
- The first number to be added to the queue.lastNumber
- The last number to be added to the queue.
public static QueueInterface<java.lang.String> initializeStringTestQueue(QueueInterface<java.lang.String> testQueue, int firstString, int lastString)
testQueue
- The testQueue to be initialized.firstString
- The number of the first String to be added to the queue.lastString
- The number of the last String to be added to the queue.
createStringTestQueue(Driver.QueueType, int, int)
public static QueueInterface<java.lang.String> createStringTestQueue(Driver.QueueType queueType, int firstString, int lastString)
queueType
- The type of queue needed. This can either be an ArrayQueue or a LinkedQueue.firstString
- The number of the first String to be added to the queue.lastString
- The number of the last String.
public static void runTestCase(Driver.TestType testType, Driver.QueueType queueType)
testType
- The type of test case being run. The choices are:
queueType
- The type of queue needed. The choices are:
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |