|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fulmine.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)
ICollectionBuilder
Set
implementation with the given size.
newSet
in interface ICollectionBuilder
T
- the type for the set elementssize
- the size
Set
implementationpublic <T> Set<T> newSet(Collection<T> other)
ICollectionBuilder
Set
implementation from another Collection
instance. This copies the contents of the other collection into the newly
constructed implementation.
newSet
in interface ICollectionBuilder
T
- 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()
ICollectionBuilder
Set
implementation with the implementation default
size.
newSet
in interface ICollectionBuilder
T
- the type for the set elements
Set
implementationpublic <T> Queue<T> newQueue()
ICollectionBuilder
Queue
implementation with the implementation default
size.
newQueue
in interface ICollectionBuilder
T
- the type for the queue elements
Queue
implementationpublic <T> Queue<T> newQueue(int size)
ICollectionBuilder
Queue
implementation with the given size.
newQueue
in interface ICollectionBuilder
T
- the type for the queue elementssize
- the size
Queue
implementationpublic <T> List<T> newList()
ICollectionBuilder
List
implementation with its implementation default
size.
newList
in interface ICollectionBuilder
T
- the type for the list elements
List
implementationpublic <T> List<T> newList(Collection<T> other)
ICollectionBuilder
List
implementation from another Collection
instance size.
newList
in interface ICollectionBuilder
T
- the type for the list elementsother
- the other Collection
to construct this list from
List
implementation constructed with the elements of
the other Collection
public <T> List<T> newList(int size)
ICollectionBuilder
List
implementation with the given size.
newList
in interface ICollectionBuilder
T
- the type for the list elementssize
- the size
List
implementationpublic <K,V> Map<K,V> newMap(int size)
ICollectionBuilder
Map
implementation with the given size.
newMap
in interface ICollectionBuilder
K
- the type for the map keysV
- the type for the map valuessize
- the size
Map
implementationpublic Map newUntypedOrderedMap(int size)
ICollectionBuilder
Map
implementation with the given size. The
implementation maintains insertion order and does not have any generic
type information.
newUntypedOrderedMap
in interface ICollectionBuilder
size
- the size
Map
implementationpublic Map newUntypedMap(int size)
ICollectionBuilder
Map
implementation with the given size. This returns
a map with no generic type information.
newUntypedMap
in interface ICollectionBuilder
size
- the size
Map
implementationpublic <K,V> Map<K,V> newMap(int size, float loadFactor)
ICollectionBuilder
Map
implementation with the given size and
loadFactor.
newMap
in interface ICollectionBuilder
K
- 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)
ICollectionBuilder
Map
implementation from another instance. This copies
the contents of the other map into the newly constructed implementation.
newMap
in interface ICollectionBuilder
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 <K,V> Map<K,V> newMap()
Map
implementation with the implementation default
size.
newMap
in interface ICollectionBuilder
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 |