public class Driver extends java.lang.Object implements DriverInterface
DriverInterface.ArrayType, DriverInterface.SortType| Constructor and Description |
|---|
Driver() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer[] |
createArray(DriverInterface.ArrayType arrayType,
int arraySize)
This method is used to create a new array of Integer objects of the type and size
specified.
|
static void |
main(java.lang.String[] args) |
void |
run(SortInterface<java.lang.Integer> si,
DriverInterface.ArrayType arrayType,
int arraySize,
int numberOfTimes) |
TestTimes[] |
runSorts(DriverInterface.ArrayType arrayType,
int arraySize,
int numberOfTimes)
This method will run all the possible sorts a specified number of times.
|
private void |
showArrayTypeAndSize(DriverInterface.ArrayType arrayType,
int arraySize) |
private void |
showMemoryHeader() |
private void |
showMemoryUsages(TestTimes[] runTimes) |
private void |
showRunTimes(TestTimes[] runTimes) |
private void |
showTimeHeader() |
public java.lang.Integer[] createArray(DriverInterface.ArrayType arrayType, int arraySize)
DriverInterfacecreateArray in interface DriverInterfacearrayType - This parameter specifies the type of array to create. See the enum DriverInterface.ArrayType.arraySize - This parameter specifies the size of array to create.public void run(SortInterface<java.lang.Integer> si, DriverInterface.ArrayType arrayType, int arraySize, int numberOfTimes)
public TestTimes[] runSorts(DriverInterface.ArrayType arrayType, int arraySize, int numberOfTimes)
DriverInterfacerunSorts in interface DriverInterfacearrayType - This parameter specifies the type of array to create each time the sort is run.
See the enum DriverInterface.ArrayType.arraySize - This parameter specifies the size of array to create each time the sort is run.numberOfTimes - This parameter specifies the number of times to run the specified sort.private void showArrayTypeAndSize(DriverInterface.ArrayType arrayType, int arraySize)
private void showTimeHeader()
private void showRunTimes(TestTimes[] runTimes)
private void showMemoryHeader()
private void showMemoryUsages(TestTimes[] runTimes)
public static void main(java.lang.String[] args)