src/main/java/org/jboss/util/collection/CachedList.java
public Object set(final int index, final Object obj) {
      maintain();
      
      SoftObject soft = SoftObject.create(obj, queue);
      soft = (SoftObject)list.set(index, soft);

      return Objects.deref(soft);
   }
public Object set(final int index, final Object obj) {
      maintain();
      
      SoftObject soft = SoftObject.create(obj, queue);
      soft = (SoftObject)list.set(index, soft);

      return Objects.deref(soft);
   }
Replaces the element at the specified position in this list with the
specified element.

@param index   Index of element to replace.
@param obj     Element to be stored at the specified postion.
@return        The previous element at the given index.