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