[LANG-653] Updated user guide

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1026486 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oliver Heger 2010-10-22 20:32:46 +00:00
parent d0b2b05af5
commit b2359c470e
1 changed files with 8 additions and 0 deletions

View File

@ -255,6 +255,14 @@ public interface ConcurrentInitializer<T> {
obtained. There are different implementations of the interface available
addressing various use cases:
</p>
<p>
<code>ConstantInitializer</code> is a very straightforward implementation of
the <code>ConcurrentInitializer</code> interface: An instance is passed an
object when it is constructed. In its <code>get()</code> method it simply
returns this object. This is useful, for instance in unit tests or in cases
when you want to pass a specific object to a component which expects a
<code>ConcurrentInitializer</code>.
</p>
<p>
The <code>LazyInitializer</code> class can be used to defer the creation of
an object until it is actually used. This makes sense, for instance, if the