List.add

Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

@param index index at which the specified element is to be inserted @param element element to be inserted @throws UnsupportedOperationException if the <tt>add</tt> operation is not supported by this list @throws ClassCastException if the class of the specified element prevents it from being added to this list @throws NullPointerException if the specified element is null and this list does not permit null elements @throws IllegalArgumentException if some property of the specified element prevents it from being added to this list @throws IndexOutOfBoundsException if the index is out of range (<tt>index &lt; 0 || index &gt; size()</tt>)

  1. void add(int index, E element)
    interface List(E)
    void
    add
    (
    int index
    ,)
  2. alias add = Collection!E.add

Meta