/**

   Copyright 2010 OpenEngSB Division, Vienna University of Technology

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   
 */
package org.openengsb.util;

import java.util.ArrayList;
import java.util.Collection;

public class Lists {
    /**
     * Default initial capacity for an {@code ArrayList} as stated in the API
     * doc.
     */
    public static final int ARRAYLIST_INITIAL_CAPACITY = 10;

    /**
     * @see ArrayList#ArrayList()
     */
    public static <E> ArrayList<E> newArrayList() {
        return new ArrayList<E>();
    }

    /**
     * @see ArrayList#ArrayList(int)
     */
    public static <E> ArrayList<E> newArrayList(int initialCapacity) {
        return new ArrayList<E>(initialCapacity);
    }

    /**
     * @see ArrayList#ArrayList(Collection)
     */
    public static <E> ArrayList<E> newArrayList(Collection<? extends E> collection) {
        return new ArrayList<E>(collection);
    }

    /**
     * Constructs a list containing the specified elements in the given order.
     */
    public static <E> ArrayList<E> newArrayList(E... elems) {
        ArrayList<E> list = newArrayList(elems.length <= Lists.ARRAYLIST_INITIAL_CAPACITY ? Lists.ARRAYLIST_INITIAL_CAPACITY
                : elems.length);
        for (E e : elems) {
            list.add(e);
        }
        return list;
    }

    private Lists() {
        throw new AssertionError();
    }
}

@@ -624,12 +624,9 @@
 se.%0A
-   
 %0A
+
  */%0A
@@ -685,37 +685,8 @@
 ist;
-%0Aimport java.util.Collection;
 %0A%0Apu
@@ -876,531 +876,8 @@
 0;%0A%0A
-    /**%0A     * @see ArrayList#ArrayList()%0A     */%0A    public static %3CE%3E ArrayList%3CE%3E newArrayList() %7B%0A        return new ArrayList%3CE%3E();%0A    %7D%0A%0A    /**%0A     * @see ArrayList#ArrayList(int)%0A     */%0A    public static %3CE%3E ArrayList%3CE%3E newArrayList(int initialCapacity) %7B%0A        return new ArrayList%3CE%3E(initialCapacity);%0A    %7D%0A%0A    /**%0A     * @see ArrayList#ArrayList(Collection)%0A     */%0A    public static %3CE%3E ArrayList%3CE%3E newArrayList(Collection%3C? extends E%3E collection) %7B%0A        return new ArrayList%3CE%3E(collection);%0A    %7D%0A%0A
     
@@ -1056,24 +1056,25 @@
 %3E list = new
+ 
 ArrayList(el
@@ -1070,17 +1070,37 @@
 rrayList
-(
+%3CE%3E(%0A                
 elems.le
@@ -1174,32 +1174,16 @@
 CAPACITY
-%0A               
  : elems

remove arraylist-stuff