|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.velocity.util.MapFactory
public class MapFactory
Factory class for creating Maps. The main purpose of this class is to take advantage of Java 5 Concurrent classes if they are available. We use reflection to instantiate java.util.concurrent classes to avoid compile time dependency on Java 5. See Issue 607 for more info on this class.
Constructor Summary | |
---|---|
MapFactory()
|
Method Summary | |
---|---|
static java.util.Map |
create(int size,
float loadFactor,
int concurrencyLevel,
boolean allowNullKeys)
Creates a new instance of a class that implements Map interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapFactory()
Method Detail |
---|
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |