org.jplate.foundation.util.impl
Class SynchronizedLinkedListFactory<V>

java.lang.Object
  extended by org.jplate.foundation.util.impl.SynchronizedLinkedListFactory<V>
Type Parameters:
V - The value type that will be stored in List's.
All Implemented Interfaces:
java.io.Serializable, FactoryIfc<java.util.List<V>>, ListFactoryIfc<V>

public final class SynchronizedLinkedListFactory<V>
extends java.lang.Object
implements ListFactoryIfc<V>

Factory that creates synchronized List's backed by LinkedList's.

To create a synchronized List containing Foo's, perform the following:

final SynchronizedLinkedListFactory <Foo> factory =
    new SynchronizedLinkedListFactory <Foo> ();

final List sList <Foo> = 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/SynchronizedLinkedListFactory.java $
    

See Also:
LinkedList, List, Serialized Form

Field Summary
private  org.apache.commons.logging.Log _log
          Used for logging.
private static long serialVersionUID
          For serialization purposes.
 
Constructor Summary
SynchronizedLinkedListFactory()
          Default constructor.
 
Method Summary
 java.util.List<V> create()
          Creates and returns a synchronized List backed by a LinkedList.
 void destroy(java.util.List<V> list)
          Clean a previsously instantiated List.
 
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

SynchronizedLinkedListFactory

public SynchronizedLinkedListFactory()
Default constructor.

Method Detail

create

public java.util.List<V> create()
Creates and returns a synchronized List backed by a LinkedList.

Specified by:
create in interface FactoryIfc<java.util.List<V>>
Returns:
A synchronized List backed by a LinkedList.
See Also:
Collections.synchronizedList(java.util.List), LinkedList, List

destroy

public void destroy(java.util.List<V> list)
Clean a previsously instantiated List. Assuming list is not null, the clear method will be called.

Specified by:
destroy in interface FactoryIfc<java.util.List<V>>
Parameters:
list - The object to clean up.