|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hazelcast.multimap.impl.ValueCollectionFactory
public final class ValueCollectionFactory
Multi-map values are backed by collections which are created by static factory methods in this class.
Method Summary | ||
---|---|---|
static
|
createCollection(Collection collection)
Creates a same type collection with the given collection depending on the MultiMapConfig.valueCollectionType . |
|
static
|
createCollection(MultiMapConfig.ValueCollectionType collectionType)
Picks right collection type, like Set or List
depending on the MultiMapConfig.valueCollectionType and creates it. |
|
static
|
createCollection(MultiMapConfig.ValueCollectionType collectionType,
int initialCapacity)
Picks right collection type, like Set or List
depending on the MultiMapConfig.valueCollectionType and creates it. |
|
static
|
emptyCollection(MultiMapConfig.ValueCollectionType collectionType)
Picks right empty collection type, like Collections.emptySet()
or Collections.emptyList() )} depending on the
MultiMapConfig.valueCollectionType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> Collection<T> createCollection(MultiMapConfig.ValueCollectionType collectionType)
Set
or List
depending on the MultiMapConfig.valueCollectionType
and creates it.
collectionType
- one of MultiMapConfig.ValueCollectionType.SET
or MultiMapConfig.ValueCollectionType.LIST
Set
or List
depending on the collectionType argument
IllegalArgumentException
public static <T> Collection<T> createCollection(MultiMapConfig.ValueCollectionType collectionType, int initialCapacity)
Set
or List
depending on the MultiMapConfig.valueCollectionType
and creates it.
collectionType
- one of MultiMapConfig.ValueCollectionType.SET
or MultiMapConfig.ValueCollectionType#LIST
initialCapacity
- if smaller than or equals to 0 falls back to default initial capacity of corresponding collection.
Set
or List
depending on the collectionType argument
IllegalArgumentException
public static <T> Collection<T> createCollection(Collection collection)
MultiMapConfig.valueCollectionType
.
collection
- to be asked to return a new appropriate implementation instance
according to MultiMapConfig.ValueCollectionType
Set
or List
depending on the collectionType argument
IllegalArgumentException
public static <T> Collection<T> emptyCollection(MultiMapConfig.ValueCollectionType collectionType)
Collections.emptySet()
or Collections.emptyList()
)} depending on the
MultiMapConfig.valueCollectionType
collectionType
- one of MultiMapConfig.ValueCollectionType#SET
or MultiMapConfig.ValueCollectionType#LIST
Collections.emptySet()
depending on the collectionType argument
IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |