code: public Object remove(int index)
      {
          DListEntry entry = (DListEntry) elements.get(index);
          // if we are in a transaction: acquire locks !
          TransactionImpl tx = getTransaction();
          if (checkForOpenTransaction(tx))
          {
              tx.deletePersistent(new RuntimeObject(entry, tx));
          }
          elements.remove(index);
          // changing the position markers of entries:
          int offset = 0;
          try
          {
              offset = ((DListEntry) elements.get(index)).getPosition();
          }
          catch (Exception ignored)
          {
          }
          for (int i = offset; i < elements.size(); i++)
          {
              entry = (DListEntry) elements.get(i);
              entry.setPosition(i);
          }
  
          return entry.getRealSubject();
      }
docs: Removes the element at the specified position in this list (optional
  operation).  Shifts any subsequent elements to the left (subtracts one
  from their indices).  Returns the element that was removed from the
  list.<p>
  
  This implementation always throws an
  <tt>UnsupportedOperationException</tt>.
  
  @param index the index of the element to remove.
  @return the element previously at the specified position.
  
  @throws UnsupportedOperationException if the <tt>remove</tt> method is
  not supported by this list.
  @throws IndexOutOfBoundsException if the specified index is out of
  range (<tt>index &lt; 0 || index &gt;= size()</tt>).