public void removeFromStart(int numOfElements) {
        if (numOfElements <= 0) {
            return;
        }
        if (numOfElements > size()) {
            throw new ArrayIndexOutOfBoundsException();
        }
        int end = mElements.length;
        if (numOfElements < end - mHead) {
            end = mHead + numOfElements;
        }
        for (int i = mHead; i < end; i++) {
            mElements[i] = null;
        }
        int removed = (end - mHead);
        numOfElements -= removed;
        mHead = (mHead + removed) & mCapacityBitmask;
        if (numOfElements > 0) {
            // mHead wrapped to 0
            for (int i = 0; i < numOfElements; i++) {
                mElements[i] = null;
            }
            mHead = numOfElements;
        }
    }
Remove multiple elements from front of the CircularArray, ignore when numOfElements
is less than or equals to 0.

@param numOfElements Number of elements to remove.
@throws ArrayIndexOutOfBoundsException if numOfElements is larger than
                                       {@link #size()}
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/collection/CircularArray.java