Class SortTimer

java.lang.Object
  extended by SortTimer

public class SortTimer
extends java.lang.Object

Write a description of class SortTimer here.

Version:
(a version number or a date)
Author:
(your name)

Constructor Summary
SortTimer()
          Builds a SortTimer
 
Method Summary
 long timeSort(Sorter sorter, int[] arr, int numTimes)
          Times how long it takes to sort the array the given number of times using the provided sorter object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortTimer

public SortTimer()
Builds a SortTimer

Method Detail

timeSort

public long timeSort(Sorter sorter,
                     int[] arr,
                     int numTimes)
Times how long it takes to sort the array the given number of times using the provided sorter object. The input array is not altered (i.e. it remains unsorted).

Parameters:
sorter - what to use for sorting
arr - the array to sort
numTimes - how many times to sort the data