Java examples for java.util:List Creation
Create new Copy On Write Array List
//package com.java2s; import java.util.Collection; import java.util.concurrent.CopyOnWriteArrayList; public class Main { public static void main(String[] argv) { System.out.println(newCopyOnWriteArrayList()); }// w w w . j a v a 2 s.co m public static <E> CopyOnWriteArrayList<E> newCopyOnWriteArrayList() { return new CopyOnWriteArrayList<E>(); } public static <E> CopyOnWriteArrayList<E> newCopyOnWriteArrayList( final Collection<? extends E> c) { return new CopyOnWriteArrayList<E>(c); } public static <E> CopyOnWriteArrayList<E> newCopyOnWriteArrayList( final E[] toCopyIn) { return new CopyOnWriteArrayList<E>(toCopyIn); } }