org.carrot2.util.factory
Class CachedInstanceFactoryDecorator<T>

java.lang.Object
  extended by org.carrot2.util.factory.CachedInstanceFactoryDecorator<T>
All Implemented Interfaces:
IFactory<T>

public final class CachedInstanceFactoryDecorator<T>
extends Object
implements IFactory<T>

A decorator that returns the first non-null instance returned by the delegate factory.


Constructor Summary
CachedInstanceFactoryDecorator(IFactory<T> factory)
           
 
Method Summary
 T createInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedInstanceFactoryDecorator

public CachedInstanceFactoryDecorator(IFactory<T> factory)
Method Detail

createInstance

public T createInstance()
Specified by:
createInstance in interface IFactory<T>


Copyright (c) Dawid Weiss, Stanislaw Osinski