docs: @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();
          }
      }