/**
  * INTERNAL: Add element into the container.
  *
  * @param element java.lang.Object
  * @param container java.lang.Object
  * @return boolean indicating whether the container changed
  */
 protected boolean addInto(Object key, Object element, Object container) {
   try {
     ((IndirectList) container).addElement(element);
     return true;
   } catch (ClassCastException ex) {
     throw QueryException.cannotAddElement(element, container, ex);
   }
 }
 /**
  * INTERNAL: Remove elements from this container starting with this index
  *
  * @param beginIndex int the point to start deleting values from the collection
  * @param container java.lang.Object
  * @return boolean indicating whether the container changed
  */
 public void removeFromWithOrder(int beginIndex, Object container) {
   int size = sizeFor(container) - 1;
   try {
     for (; size >= beginIndex; --size) {
       ((IndirectList) container).removeElementAt(size);
     }
   } catch (ClassCastException ex1) {
     throw QueryException.cannotRemoveFromContainer(new Integer(size), container, this);
   }
 }
 /**
  * INTERNAL: Add element into a container which implements the Collection interface.
  *
  * @param element java.lang.Object
  * @param container java.lang.Object
  * @return boolean indicating whether the container changed
  */
 public void addIntoWithOrder(Vector indexes, Hashtable elements, Object container) {
   Object object = null;
   try {
     Enumeration indexEnum = indexes.elements();
     while (indexEnum.hasMoreElements()) {
       Integer index = (Integer) indexEnum.nextElement();
       object = elements.get(index);
       if (index.intValue() >= (sizeFor(container) - 1)) {
         ((IndirectList) container).addElement(object);
       } else {
         ((IndirectList) container).setElementAt(object, index.intValue());
       }
     }
   } catch (ClassCastException ex1) {
     throw QueryException.cannotAddElement(object, container, ex1);
   }
 }