org.apache.commons.collections.functors
public class PrototypeFactory extends Object
Since: Commons Collections 3.0
Version: $Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $
Method Summary | |
---|---|
static Factory | getInstance(Object prototype)
Factory method that performs validation.
|
Creates a Factory that will return a clone of the same prototype object each time the factory is used. The prototype will be cloned using one of these techniques (in order):
Parameters: prototype the object to clone each time in the factory
Returns: the prototype
factory
Throws: IllegalArgumentException if the prototype is null IllegalArgumentException if the prototype cannot be cloned