private <T> void shiftArrayBy(T[] array, int number) {
        T[] temparr = (T[]) new Object[array.length + number];

        int srcPos = (number > 0) ? 0 : number;
        int destPos = (number > 0) ? number : 0;
        int length = (number > 0) ? array.length : array.length - number;

        System.arraycopy(array, srcPos, temparr, destPos, length);
        array = temparr;
    }