Source of RemovalComparisons.java


  2: /**
  3:  * A program to compare the running times to remove about 20% of a long list
  4:  * using three different methods: List::remove(int), List::remove(T), and
  5:  * Iterator::remove().
  6:  *
  7:  * @author Mark Young (A00000000)
  8:  */
  9: public class RemovalComparisons {

 11:     /**
 12:      * @param args the command line arguments
 13:      */
 14:     public static void main(String[] args) {
 15:         printIntroduction();
 16:         Utilities.pause();
 17:         
 18:         IntegerListRemovals.main(args);
 19:         StringListRemovals.main(args);
 20:     }

 22:     private static void printIntroduction() {
 23:         Utilities.printTitle("Comparing Times for Removing List Elements");
 24:         Utilities.printParagraph("This program compares timing data for "
 25:                 + "removing elements from ArrayLists and LinkedLists. "
 26:                 + "It compares three different ways of doing the task.");
 27:         Utilities.printParagraph("The program also compares runtimes for "
 28:                 + "lists of Integers and lists of Strings. It does that by "
 29:                 + "calling the programs IntegerListRemovals and "
 30:                 + "StringListRemovals.");
 31:         Utilities.printParagraph("By Mark Young (A00000000)");
 32:     }

 34: }