org.jplate.foundation.util.impl
Class UnsynchronizedHashMapFactory<K,V>

java.lang.Object
  extended by org.jplate.foundation.util.impl.UnsynchronizedHashMapFactory<K,V>
Type Parameters:
K - The key type stored in HashMap.
V - represents the value type stored in HashMap.
All Implemented Interfaces:
java.io.Serializable, FactoryIfc<java.util.Map<K,V>>, MapFactoryIfc<K,V>

public final class UnsynchronizedHashMapFactory<K,V>
extends java.lang.Object
implements MapFactoryIfc<K,V>

Factory that creates unsynchronized HashMap's.

To create a HashMap containing keys Foo and value Bar, perform the following:

final UnsynchronizedHashMapFactory <Foo, Bar> factory =
    new UnsynchronizedHashMapFactory <Foo, Bar> ();

final Map map <Foo, Bar> = factory.create ();
    
Modifications:
    $Date: 2008-12-02 12:32:45 -0500 (Tue, 02 Dec 2008) $
    $Revision: 479 $
    $Author: sfloess $
    $HeadURL: https://jplate.svn.sourceforge.net/svnroot/jplate/trunk/src/dev/java/org/jplate/foundation/util/impl/UnsynchronizedHashMapFactory.java $
    

See Also:
HashMap, Map, Serialized Form

Field Summary
private  org.apache.commons.logging.Log _log
          Used for logging.
private static long serialVersionUID
          For serialization purposes.
 
Constructor Summary
UnsynchronizedHashMapFactory()
          Default constructor only allowed to self and class.
 
Method Summary
 java.util.Map<K,V> create()
          Creates and returns a HashMap.
 void destroy(java.util.Map<K,V> map)
          Cleanup a previsously instantiated Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
For serialization purposes.

See Also:
Constant Field Values

_log

private final transient org.apache.commons.logging.Log _log
Used for logging.

Constructor Detail

UnsynchronizedHashMapFactory

public UnsynchronizedHashMapFactory()
Default constructor only allowed to self and class.

Method Detail

create

public java.util.Map<K,V> create()
Creates and returns a HashMap.

Specified by:
create in interface FactoryIfc<java.util.Map<K,V>>
Returns:
a HashMap.

destroy

public void destroy(java.util.Map<K,V> map)
Cleanup a previsously instantiated Map. Assuming map is not null, the clear method will be called.

Specified by:
destroy in interface FactoryIfc<java.util.Map<K,V>>
Parameters:
map - The object to clean up.