|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICollectionFactory
A factory that creates instances of Collection
.
Field Summary | |
---|---|
static ICollectionFactory |
ARRAY_LIST_FACTORY
A factory that creates instances of ArrayList . |
static ICollectionFactory |
HASH_SET_FACTORY
A factory that creates instances of HashSet . |
static ICollectionFactory |
LINKED_HASH_SET_FACTORY
A factory that creates instances of LinkedHashSet . |
static ICollectionFactory |
LINKED_LIST_FACTORY
A factory that creates instances of LinkedList . |
static ICollectionFactory |
TREE_SET_FACTORY
A factory that creates instances of TreeSet . |
static ICollectionFactory |
VECTOR_FACTORY
A factory that creates instances of Vector . |
Method Summary | |
---|---|
java.util.Collection |
createCollection()
Create a new instance of a collection, which is initially empty. |
java.util.Collection |
createCollection(java.util.Collection source)
Create a collection that contains the same elements as source . |
java.util.Collection |
createCollection(int capacity)
Create a new instance of a collection, which is initially empty. |
Field Detail |
---|
static final ICollectionFactory ARRAY_LIST_FACTORY
ArrayList
.
static final ICollectionFactory LINKED_LIST_FACTORY
LinkedList
.
static final ICollectionFactory HASH_SET_FACTORY
HashSet
.
static final ICollectionFactory LINKED_HASH_SET_FACTORY
LinkedHashSet
.
static final ICollectionFactory TREE_SET_FACTORY
TreeSet
.
static final ICollectionFactory VECTOR_FACTORY
Vector
.
Method Detail |
---|
java.util.Collection createCollection()
java.util.Collection createCollection(int capacity)
capacity
elements without resizing.
java.util.Collection createCollection(java.util.Collection source)
source
.
source
- The collection to copy.
java.lang.NullPointerException
- if source
is null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |