code: public void add(int index, int element)
      {
          if (index == size())//special case, just appending
          {
              add(element);
          }
          else
          {
              boundsCheck(index);
              enlargeIfNeeded(1);
              System.arraycopy(array, index, array, index+1, end-index);
              array[index] = element;
              end++;
          }
      }
docs: Operates exactly as {@link #add(int, java.lang.Integer) }
  @param index the index to add the value into
  @param element the value to add