code: public void add(int index, double element)
      {
          if(index == size())//special case, just appending
          {
              add(element);
          }
          else
          {
              boundsCheck(index);
              enlageIfNeeded(1);
              System.arraycopy(array, index, array, index+1, size()-index);
              set(index, element);
              increasedSize(1);
          }
      }
docs: Operates exactly as {@link #add(int, java.lang.Double) }
  @param index the index to add at
  @param element the value to add