Interface Factory

  • All Known Implementing Classes:
    ConstantFactory, ExceptionFactory, InstantiateFactory

    public interface Factory
    Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.
    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.

    Commons Collections 2.1
    • Method Detail

      • create

        java.lang.Object create()
        Create a new object.
        a new object
        FunctorException - (runtime) if the factory cannot create an object