edu.stanford.nlp.util
Class CollectionFactory<T>
java.lang.Object
edu.stanford.nlp.util.CollectionFactory<T>
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- CollectionFactory.ArrayListFactory, CollectionFactory.HashSetFactory, CollectionFactory.LinkedListFactory
public abstract class CollectionFactory<T>
- extends Object
- implements Serializable
Factory for vending Collections. It's a class instead of an interface because I guessed that it'd primarily be used for its inner classes.
- Author:
- Dan Klein (klein@cs.stanford.edu)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ARRAY_LIST_FACTORY
public static final CollectionFactory ARRAY_LIST_FACTORY
LINKED_LIST_FACTORY
public static final CollectionFactory LINKED_LIST_FACTORY
HASH_SET_FACTORY
public static final CollectionFactory HASH_SET_FACTORY
CollectionFactory
public CollectionFactory()
hashSetFactory
public static <E> CollectionFactory<E> hashSetFactory()
- This method allows type safety in calling code.
arrayListFactory
public static <E> CollectionFactory<E> arrayListFactory()
linkedListFactory
public static <E> CollectionFactory<E> linkedListFactory()
newCollection
public abstract Collection<T> newCollection()
newEmptyCollection
public abstract Collection<T> newEmptyCollection()
Stanford NLP Group