Top Description Methods
org.apache.commons.collections4

public Interface Factory<T>

Known Direct Implementers
org.apache.commons.collections4.functors.ConstantFactory, org.apache.commons.collections4.functors.ExceptionFactory, org.apache.commons.collections4.functors.InstantiateFactory, org.apache.commons.collections4.functors.PrototypeFactory.PrototypeCloneFactory, org.apache.commons.collections4.functors.PrototypeFactory.PrototypeSerializationFactory, org.apache.commons.collections4.map.MultiValueMap.ReflectionFactory
Annotations
@FunctionalInterface
Type Parameters
<T>
the type that the factory creates

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
2.1

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

a new object
create
()

Create a new object.

Method Detail

createback to summary
public T create()

Create a new object.

Returns:T

a new object

Exceptions
FunctorException:
(runtime) if the factory cannot create an object