org.apache.commons.collections
Interface Factory<T>

All Known Implementing Classes:
ConstantFactory, ExceptionFactory, InstantiateFactory

public interface Factory<T>

Defines a functor interface implemented by classes that create objects.

A Factory creates an object without using an input parameter. If an input parameter is required, then Transformer is more appropriate.

Standard implementations of common factories are provided by FactoryUtils. These include factories that return a constant, a copy of a prototype or a new instance.

Since:
Commons Collections 2.1
Version:
$Revision: 1.1.1.1 $ $Date: 2005/05/23 04:32:55 $
Author:
Arron Bates, Matt Hall, John Watkinson, Stephen Colebourne

Method Summary
 T create()
          Create a new object.
 

Method Detail

create

T create()
Create a new object.

Returns:
a new object
Throws:
FunctorException - (runtime) if the factory cannot create an object


Copyright © 2005-2005 Apache Software Foundation, Matt Hall, John Watkinson. All Rights Reserved.