public class ConcurrentHashSetFactory extends AbstractSetFactory
ConcurrentMapFactory that creates instances of a
 ConcurrentHashSet. Since no such class exists in JDK, we provide it via ConcurrentHashMap.| Modifier and Type | Field and Description | 
|---|---|
| static ConcurrentHashSetFactory | INSTANCEThe singleton instance. | 
| Constructor and Description | 
|---|
| ConcurrentHashSetFactory()The constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| <E> Set<E> | create()This method creates a new  Collectioninstance. | 
| <E> Set<E> | create(int capacity)This method creates a new  Collectioninstance with the given initialcapacity. | 
| Class<? extends Set> | getCollectionImplementation()This method gets the implementation of the  collection-interfaceused by this
 factory. | 
createGeneric, createGeneric, getCollectionInterfacepublic static final ConcurrentHashSetFactory INSTANCE
public <E> Set<E> create()
CollectionFactoryCollection instance. Collection can NOT be bound to the generic type <COLLECTION> because of limitations in Java's
 generic type system. You need to work on the actual sub-interface (e.g. ListFactory) to get the proper
 result type.E - the type of elements contained in the collection.CollectionFactory.createGeneric()public <E> Set<E> create(int capacity)
CollectionFactoryCollection instance with the given initial capacity. Collection can NOT be bound to the generic type <COLLECTION> because of limitations in Java's
 generic type system. You need to work on the actual sub-interface (e.g. ListFactory) to get the proper
 result type.E - the type of elements contained in the collection.capacity - is the initial capacity of the collection.CollectionFactory.createGeneric(int)public Class<? extends Set> getCollectionImplementation()
CollectionFactorycollection-interface used by this
 factory.Collection implementation.Copyright © 2001–2016 mmm-Team. All rights reserved.