org.schmant.arg
Class ExistingObjectProducer<T>

java.lang.Object
  extended by org.schmant.arg.ExistingObjectProducer<T>
All Implemented Interfaces:
Producer<T>

public class ExistingObjectProducer<T>
extends Object
implements Producer<T>

This Producer returns an object that already exists when this object is created.

Since:
0.9
Author:
Karl Gustafsson

Constructor Summary
ExistingObjectProducer(T obj)
           
 
Method Summary
 T get()
          Returns the produced object, or null if nothing is produced yet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExistingObjectProducer

public ExistingObjectProducer(T obj)
Method Detail

get

public T get()
Description copied from interface: Producer
Returns the produced object, or null if nothing is produced yet.

This method should be implemented thread-safe.

Specified by:
get in interface Producer<T>
Returns:
The produced object.