Package org.apache.commons.collections4
Interface Factory<T>
-
- Type Parameters:
T- the type of results supplied by this supplier.
- All Superinterfaces:
java.util.function.Supplier<T>
- All Known Implementing Classes:
ConstantFactory,ExceptionFactory,InstantiateFactory
@Deprecated public interface Factory<T> extends java.util.function.Supplier<T>
Deprecated.UseSupplier.Defines a functor interface implemented by classes that create objects.A
Factorycreates an object without using an input parameter. If an input parameter is required, thenTransformeris 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
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Tcreate()Deprecated.Create a new object.default Tget()Deprecated.
-