|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfulmine.util.collection.CollectionBuilder
public class CollectionBuilder
Implementation that returns standard JDK Collection instances.
| Constructor Summary | |
|---|---|
CollectionBuilder()
|
|
| Method Summary | ||
|---|---|---|
|
newList()
Construct a List implementation with its implementation default
size. |
|
|
newList(Collection<T> other)
Construct a List implementation from another Collection
instance size. |
|
|
newList(int size)
Construct a List implementation with the given size. |
|
|
newMap()
Construct a Map implementation with the implementation default
size. |
|
|
newMap(int size)
Construct a Map implementation with the given size. |
|
|
newMap(int size,
float loadFactor)
Construct a Map implementation with the given size and
loadFactor. |
|
|
newMap(Map<K,V> other)
Construct a Map implementation from another instance. |
|
|
newQueue()
Construct a Queue implementation with the implementation default
size. |
|
|
newQueue(int size)
Construct a Queue implementation with the given size. |
|
|
newSet()
Construct a Set implementation with the implementation default
size. |
|
|
newSet(Collection<T> other)
Construct a Set implementation from another Collection
instance. |
|
|
newSet(int size)
Construct a Set implementation with the given size. |
|
Map |
newUntypedMap(int size)
Construct a Map implementation with the given size. |
|
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 CollectionBuilder()
| Method Detail |
|---|
public <T> Set<T> newSet(int size)
ICollectionBuilderSet implementation with the given size.
newSet in interface ICollectionBuilderT - the type for the set elementssize - the size
Set implementationpublic <T> Set<T> newSet(Collection<T> other)
ICollectionBuilderSet implementation from another Collection
instance. This copies the contents of the other collection into the newly
constructed implementation.
newSet in interface ICollectionBuilderT - the type for the set elementsother - the other Collection instance to construct the
Set from
Set implementation constructed from a
Collection instance.public <T> Set<T> newSet()
ICollectionBuilderSet implementation with the implementation default
size.
newSet in interface ICollectionBuilderT - the type for the set elements
Set implementationpublic <T> Queue<T> newQueue()
ICollectionBuilderQueue implementation with the implementation default
size.
newQueue in interface ICollectionBuilderT - the type for the queue elements
Queue implementationpublic <T> Queue<T> newQueue(int size)
ICollectionBuilderQueue implementation with the given size.
newQueue in interface ICollectionBuilderT - the type for the queue elementssize - the size
Queue implementationpublic <T> List<T> newList()
ICollectionBuilderList implementation with its implementation default
size.
newList in interface ICollectionBuilderT - the type for the list elements
List implementationpublic <T> List<T> newList(Collection<T> other)
ICollectionBuilderList implementation from another Collection
instance size.
newList in interface ICollectionBuilderT - the type for the list elementsother - the other Collection to construct this list from
List implementation constructed with the elements of
the other Collectionpublic <T> List<T> newList(int size)
ICollectionBuilderList implementation with the given size.
newList in interface ICollectionBuilderT - the type for the list elementssize - the size
List implementationpublic <K,V> Map<K,V> newMap(int size)
ICollectionBuilderMap implementation with the given size.
newMap in interface ICollectionBuilderK - the type for the map keysV - the type for the map valuessize - the size
Map implementationpublic Map newUntypedOrderedMap(int size)
ICollectionBuilderMap implementation with the given size. The
implementation maintains insertion order and does not have any generic
type information.
newUntypedOrderedMap in interface ICollectionBuildersize - the size
Map implementationpublic Map newUntypedMap(int size)
ICollectionBuilderMap implementation with the given size. This returns
a map with no generic type information.
newUntypedMap in interface ICollectionBuildersize - the size
Map implementation
public <K,V> Map<K,V> newMap(int size,
float loadFactor)
ICollectionBuilderMap implementation with the given size and
loadFactor.
newMap in interface ICollectionBuilderK - the type for the map keysV - the type for the map valuessize - the sizeloadFactor - the loadFactor
Map implementationpublic <K,V> Map<K,V> newMap(Map<K,V> other)
ICollectionBuilderMap implementation from another instance. This copies
the contents of the other map into the newly constructed implementation.
newMap in interface ICollectionBuilderK - 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 <K,V> Map<K,V> newMap()
Map implementation with the implementation default
size.
newMap in interface ICollectionBuilderK - 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 | |||||||||