code: private void removeRange(int fromIndex, int toIndex) {
          final ReentrantLock lock = this.lock;
          lock.lock();
          try {
              Object[] elements = getArray();
              int len = elements.length;
  
              if (fromIndex < 0 || toIndex > len || toIndex < fromIndex)
                  throw new IndexOutOfBoundsException();
              int newlen = len - (toIndex - fromIndex);
              int numMoved = len - toIndex;
              if (numMoved == 0)
                  setArray(Arrays.copyOf(elements, newlen));
              else {
                  Object[] newElements = new Object[newlen];
                  System.arraycopy(elements, 0, newElements, 0, fromIndex);
                  System.arraycopy(elements, toIndex, newElements,
                                   fromIndex, numMoved);
                  setArray(newElements);
              }
          } finally {
              lock.unlock();
          }
      }
docs: Removes from this list all of the elements whose index is between
  <tt>fromIndex</tt>, inclusive, and <tt>toIndex</tt>, exclusive.
  Shifts any succeeding elements to the left (reduces their index).
  This call shortens the list by <tt>(toIndex - fromIndex)</tt> elements.
  (If <tt>toIndex==fromIndex</tt>, this operation has no effect.)
  
  @param fromIndex index of first element to be removed
  @param toIndex index after last element to be removed
  @throws IndexOutOfBoundsException if fromIndex or toIndex out of range
  ({@code{fromIndex < 0 || toIndex > size() || toIndex < fromIndex})