public class MapFactory
extends java.lang.Object
| 构造器和说明 |
|---|
MapFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
static java.util.Map |
create(boolean allowNullKeys)
Creates a new instance of a class that implements Map interface
using the JDK defaults for initial size, load factor, etc.
|
static java.util.Map |
create(int size,
float loadFactor,
int concurrencyLevel,
boolean allowNullKeys)
Creates a new instance of a class that implements Map interface.
|
public static java.util.Map create(boolean allowNullKeys)
allowNullKeys - if true, the returned Map instance supports null keyspublic static java.util.Map create(int size,
float loadFactor,
int concurrencyLevel,
boolean allowNullKeys)
size - initial size of the maploadFactor - smaller value = better performance,
larger value = better memory utilizationconcurrencyLevel - estimated number of writer Threads.
If this is smaller than 1, HashMap is always returned which is not
threadsafe.allowNullKeys - if true, the returned Map instance supports null keys