@Override
    public void displayHeap() {
        String dots = "...............................";
        System.out.println(dots + dots);
        System.out.print("heapArray: ");
        this.currentSize = getCurrentSize();
        this.heapArray = getHeapArray();
        for (int m = 0; m < this.currentSize; m++)
            if (this.heapArray[m] != null) {
                System.out.print(this.heapArray[m].getData() + " ");
            }
            else {
                System.out.print("-- ");
            }
        System.out.println();
        int nBlanks = 32;
        int itemsPerRow = 1;
        int column = 0;
        int j = 0;
        System.out.println(dots + dots);
        while (this.currentSize > 0) {
            if (column == 0)
                for (int k = 0; k < nBlanks; k++)
                    System.out.print(" ");
            System.out.print(this.heapArray[j].getData());
            if (++j == this.currentSize)
                break;
            if (++column == itemsPerRow) {
                nBlanks /= 2;
                itemsPerRow *= 2;
                column = 0;
                System.out.println();
            } else
                for (int k = 0; k < nBlanks * 2 - 2; k++)
                    System.out.print(" ");
        }
        System.out.println("\n" + dots + dots);
    }