public abstract class CollectionFactory<T> extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
CollectionFactory.ArrayListFactory<T> |
static class |
CollectionFactory.HashSetFactory<T> |
static class |
CollectionFactory.LinkedListFactory<T> |
static class |
CollectionFactory.SizedArrayListFactory<T> |
static class |
CollectionFactory.TreeSetFactory<T> |
Modifier and Type | Field and Description |
---|---|
static CollectionFactory |
ARRAY_LIST_FACTORY |
static CollectionFactory |
HASH_SET_FACTORY |
static CollectionFactory |
LINKED_LIST_FACTORY |
static CollectionFactory |
TREE_SET_FACTORY |
Constructor and Description |
---|
CollectionFactory() |
Modifier and Type | Method and Description |
---|---|
static <E> CollectionFactory<E> |
arrayListFactory()
Return a factory for making ArrayList Collections.
|
static <E> CollectionFactory<E> |
arrayListFactory(int size) |
static <E> CollectionFactory<E> |
hashSetFactory() |
static <E> CollectionFactory<E> |
linkedListFactory() |
abstract Collection<T> |
newCollection() |
abstract Collection<T> |
newEmptyCollection() |
static <E> CollectionFactory<E> |
treeSetFactory() |
public static final CollectionFactory ARRAY_LIST_FACTORY
public static final CollectionFactory LINKED_LIST_FACTORY
public static final CollectionFactory HASH_SET_FACTORY
public static final CollectionFactory TREE_SET_FACTORY
public abstract Collection<T> newCollection()
public abstract Collection<T> newEmptyCollection()
public static <E> CollectionFactory<E> arrayListFactory()
public static <E> CollectionFactory<E> arrayListFactory(int size)
public static <E> CollectionFactory<E> linkedListFactory()
public static <E> CollectionFactory<E> hashSetFactory()
public static <E> CollectionFactory<E> treeSetFactory()