Class ListBeanProvider

  • All Implemented Interfaces:
    BeanProvider

    public class ListBeanProvider
    extends CollectionBeanProvider

    A specific CollectionBeanProvider implementation that creates a list bean.

    This concrete implementation creates a java.util.ArrayList in its createCollection() method.

    Version:
    $Id: ListBeanProvider.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Constructor Detail

      • ListBeanProvider

        public ListBeanProvider​(Collection<Dependency> deps)
        Creates a new instance of ListBeanProvider and initializes it with the given dependencies for the list elements.
        Parameters:
        deps - a collection with the dependencies of the list elements
    • Method Detail

      • createCollection

        protected Collection<Object> createCollection​(int size)
        Creates the collection managed by this bean provider. This implementation creates an array list with the specified initial capacity.
        Specified by:
        createCollection in class CollectionBeanProvider
        Parameters:
        size - the size of the collection
        Returns:
        the collection object