Java tutorial
//package com.java2s; import java.util.Collection; import java.util.concurrent.CopyOnWriteArrayList; public class Main { public static <E> CopyOnWriteArrayList<E> createCopyOnWriteArrayList() { return new CopyOnWriteArrayList<E>(); } public static <E> CopyOnWriteArrayList<E> createCopyOnWriteArrayList(Collection<? extends E> collection) { if (collection == null) { return new CopyOnWriteArrayList<E>(); } return new CopyOnWriteArrayList<E>(); } public static <E> CopyOnWriteArrayList<E> createCopyOnWriteArrayList(E[] toCopyIn) { if (toCopyIn == null) { return new CopyOnWriteArrayList<E>(); } return new CopyOnWriteArrayList<E>(toCopyIn); } }