public final class ValueCollectionFactory extends Object
| Modifier and Type | Method and Description | 
|---|---|
static <T> Collection<T> | 
createCollection(Collection collection)
Creates a same type collection with the given collection depending on the
  
MultiMapConfig.valueCollectionType. | 
static <T> Collection<T> | 
createCollection(MultiMapConfig.ValueCollectionType collectionType)
Picks right collection type, like  
Set or List
 depending on the MultiMapConfig.valueCollectionType and creates it. | 
static <T> Collection<T> | 
createCollection(MultiMapConfig.ValueCollectionType collectionType,
                int initialCapacity)
Picks right collection type, like  
Set or List
 depending on the MultiMapConfig.valueCollectionType and creates it. | 
static <T> Collection<T> | 
emptyCollection(MultiMapConfig.ValueCollectionType collectionType)
Picks right empty collection type, like  
Collections.emptySet()
 or Collections.emptyList() )} depending on the
 MultiMapConfig.valueCollectionType | 
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.LISTSet or List depending on the collectionType argumentIllegalArgumentException - if collectionType is unknownpublic static <T> Collection<T> createCollection(Collection collection)
MultiMapConfig.valueCollectionType.collection - to be asked to return a new appropriate implementation instance
                   according to MultiMapConfig.ValueCollectionTypeSet or List depending on the collectionType argumentIllegalArgumentException - if collectionType is unknownpublic 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#LISTinitialCapacity - if smaller than or equals to 0 falls back to default initial capacity of corresponding collection.Set or List depending on the collectionType argumentIllegalArgumentException - if collectionType is unknownpublic static <T> Collection<T> emptyCollection(MultiMapConfig.ValueCollectionType collectionType)
Collections.emptySet()
 or Collections.emptyList() )} depending on the
 MultiMapConfig.valueCollectionTypecollectionType - one of MultiMapConfig.ValueCollectionType#SET
                       or MultiMapConfig.ValueCollectionType#LISTCollections.emptySet()
 depending on the collectionType argumentIllegalArgumentException - if collectionType is unknownCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.