/** * Constructs a new set containing the elements in the specified * collection. The <tt>ConcurrentHashMap</tt> is created with default load factor * (0.75) and an initial capacity sufficient to contain the elements in * the specified collection. * * @param c the collection whose elements are to be placed into this set. * @throws NullPointerException if the specified collection is null. */ public ConcurrentSet(Collection<? extends E> c) { super(new ConcurrentHashMap<E, Object>(Math.max((int)(c.size() / .75f) + 1, 16))); addAll(c); }