org.carrot2.util.factory
Class CachedInstanceFactoryDecorator<T>
java.lang.Object
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CachedInstanceFactoryDecorator
public CachedInstanceFactoryDecorator(IFactory<T> factory)
createInstance
public T createInstance()
- Specified by:
createInstance in interface IFactory<T>
Copyright (c) Dawid Weiss, Stanislaw Osinski