/** * Constructs a new set containing the elements in the specified collection. * The {@code HashMap} is created with default load factor (0.75) and an initial * capacity sufficient to contain the elements in the specified collection. */ public HashSet(Collection c) { map = new HashMap<>(Math.max((int) (c.size()/.75f) + 1, 16)); addAll(c); }