A very simple implementation of the {@link ConcurrentInitializer} interfacewhich always returns the same object.
An instance of this class is passed a reference to an object when it is constructed. The {@link #get()} method just returns this object. Nosynchronization is required.
This class is useful for instance for unit testing or in cases where a specific object has to be passed to an object which expects a {@link ConcurrentInitializer}.
@since 3.0 @version $Id: ConstantInitializer.java 1088899 2011-04-05 05:31:27Z bayard $ @param < T> the type of the object managed by this initializer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|