u7
Class MergeSort

java.lang.Object
  |
  +--u7.MergeSort
All Implemented Interfaces:
SortObject

public class MergeSort
extends java.lang.Object
implements SortObject


Constructor Summary
MergeSort()
           
 
Method Summary
 void sort(Item[] aitem, java.util.Comparator comparator)
           
static void sort(Item[] aitem, int i, java.util.Comparator comparator)
          Sorts the subarray with first index i using the merge sort algroithm.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeSort

public MergeSort()
Method Detail

sort

public void sort(Item[] aitem,
                 java.util.Comparator comparator)
Sorts the array using the mergesort algorithm.
Specified by:
sort in interface SortObject

sort

public static void sort(Item[] aitem,
                        int i,
                        java.util.Comparator comparator)
Sorts the subarray with first index i using the mergesort algorithm.