public class Sets extends Object
| Modifier and Type | Method and Description |
|---|---|
static <E> HashSet<E> |
newHashSetWithExpectedSize(int expectedSize)
Creates an empty
HashSet instance with enough capacity to hold the
specified number of elements without rehashing. |
public static <E> HashSet<E> newHashSetWithExpectedSize(int expectedSize)
HashSet instance with enough capacity to hold the
specified number of elements without rehashing.expectedSize - the expected sizeHashSet with enough capacity to hold expectedSize elements without rehashingIllegalArgumentException - if expectedSize is negativeCopyright © 2013. All Rights Reserved.