|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfulmine.util.collection.CollectionFactory
public final class CollectionFactory
A factory for constructing Collection instances. A
ICollectionBuilder instance is used to construct the collection
instances. The implementation of the builder is specified by setting the
class name of the builder to use against the system property name
ICollectionBuilder.
| Constructor Summary | |
|---|---|
CollectionFactory()
|
|
| Method Summary | ||
|---|---|---|
static
|
newList()
Construct a List implementation with its implementation default
size. |
|
static
|
newList(Collection<T> other)
Construct a List implementation from another Collection
instance size. |
|
static
|
newList(int size)
Construct a List implementation with the given size. |
|
static
|
newMap()
Construct a Map implementation with the implementation default
size. |
|
static
|
newMap(int size)
Construct a Map implementation with the given size. |
|
static
|
newMap(int size,
float loadFactor)
Construct a Map implementation with the given size and
loadFactor. |
|
static
|
newMap(Map<K,V> other)
Construct a Map implementation from another instance. |
|
static
|
newQueue()
Construct a Queue implementation with the implementation default
size. |
|
static
|
newQueue(int size)
Construct a Queue implementation with the given size. |
|
static
|
newSet()
Construct a Set implementation with the implementation default
size. |
|
static
|
newSet(Collection<T> other)
Construct a Set implementation from another Collection
instance. |
|
static
|
newSet(int size)
Construct a Set implementation with the given size. |
|
static Map |
newUntypedMap(int size)
Construct a Map implementation with the given size. |
|
static Map |
newUntypedOrderedMap(int size)
Construct a Map implementation with the given size. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionFactory()
| Method Detail |
|---|
public static <T> Set<T> newSet(int size)
Set implementation with the given size.
T - the type for the set elementssize - the size
Set implementationpublic static <T> Set<T> newSet(Collection<T> other)
Set implementation from another Collection
instance. This copies the contents of the other collection into the newly
constructed implementation.
T - the type for the set elementsother - the other Collection instance to construct the
Set from
Set implementation constructed from a
Collection instance.public static <T> Set<T> newSet()
Set implementation with the implementation default
size.
T - the type for the set elements
Set implementationpublic static <T> Queue<T> newQueue()
Queue implementation with the implementation default
size.
T - the type for the queue elements
Queue implementationpublic static <T> Queue<T> newQueue(int size)
Queue implementation with the given size.
T - the type for the queue elementssize - the size
Queue implementationpublic static <T> List<T> newList()
List implementation with its implementation default
size.
T - the type for the list elements
List implementationpublic static <T> List<T> newList(Collection<T> other)
List implementation from another Collection
instance size.
T - the type for the list elementsother - the other Collection to construct this list from
List implementation constructed with the elements of
the other Collectionpublic static <T> List<T> newList(int size)
List implementation with the given size.
T - the type for the list elementssize - the size
List implementationpublic static <K,V> Map<K,V> newMap(int size)
Map implementation with the given size.
K - the type for the map keysV - the type for the map valuessize - the size
Map implementationpublic static Map newUntypedOrderedMap(int size)
Map implementation with the given size. The
implementation maintains insertion order and does not have any generic
type information.
size - the size
Map implementationpublic static Map newUntypedMap(int size)
Map implementation with the given size. This returns
a map with no generic type information.
size - the size
Map implementation
public static <K,V> Map<K,V> newMap(int size,
float loadFactor)
Map implementation with the given size and
loadFactor.
K - the type for the map keysV - the type for the map valuessize - the sizeloadFactor - the loadFactor
Map implementationpublic static <K,V> Map<K,V> newMap(Map<K,V> other)
Map implementation from another instance. This copies
the contents of the other map into the newly constructed implementation.
K - the type for the map keysV - the type for the map valuesother - the other instance to construct this map from
Map implementation constructed from the other instance.public static <K,V> Map<K,V> newMap()
Map implementation with the implementation default
size.
K - the type for the map keysV - the type for the map values
Map implementation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||