private void merge(Item [] a, int lo, int mid, int hi)
    {
        int i = lo, j = mid + 1;
        for (int k= lo; k <= hi; k++) {
            this.tmp[k] = a[k];
        }
        for (int k = lo; k <= hi; k++) {
            if (i > mid) {
                a[k] = a[j++];
            }
            else if (j > hi) {
                a[k] = this.tmp[i++];
            }
            else if (this.less(this.tmp[j], this.tmp[i])) {
                a[k] = this.tmp[j++];
            }
            else {
                a[k] = this.tmp[i++];
            }
        }
    }