public class SetFactory
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
SetFactory()
Don't allow instantiation, do allow overrides.
|
Modifier and Type | Method and Description |
---|---|
static <E> java.util.Set<E> |
createNewSet()
Create a new HashSet.
|
static <E> java.util.Set<E> |
createNewSet(int capacity)
Create a new HashSet.
|
static <E> java.util.SortedSet<E> |
createNewSortedSet()
Create a new TreeSet.
|
public static <E> java.util.Set<E> createNewSet()
public static <E> java.util.Set<E> createNewSet(int capacity)
capacity
- Initial capacity.public static <E> java.util.SortedSet<E> createNewSortedSet()