code: @Override
      public E remove(int index) {
          final ReentrantLock lock = this.lock;
          lock.lock();
          try {
              Object[] elements = getArray();
              int len = elements.length;
              E oldValue = get(elements, index);
              int numMoved = len - index - 1;
              if (numMoved == 0)
                  setArray(Arrays.copyOf(elements, len - 1));
              else {
                  Object[] newElements = new Object[len - 1];
                  System.arraycopy(elements, 0, newElements, 0, index);
                  System.arraycopy(elements, index + 1, newElements, index,
                                   numMoved);
                  setArray(newElements);
              }
              return oldValue;
          } finally {
              lock.unlock();
          }
      }
docs: Removes the element at the specified position in this list.
  Shifts any subsequent elements to the left (subtracts one from their
  indices). Returns the element that was removed from the list.
  
  @throws IndexOutOfBoundsException {@inheritDoc}