T
- the type that the factory creates@FunctionalInterface public interface Factory<T>
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.
Modifier and Type | Method and Description |
---|---|
T |
create()
Create a new object.
|
T create()
FunctorException
- (runtime) if the factory cannot create an objectCopyright © 2001–2019 The Apache Software Foundation. All rights reserved.