Class ListCollectionHandler

java.lang.Object
io.beanmapper.core.collections.AbstractCollectionHandler<List>
io.beanmapper.core.collections.ListCollectionHandler
All Implemented Interfaces:
CollectionHandler<List>

public class ListCollectionHandler extends AbstractCollectionHandler<List>
  • Constructor Details

    • ListCollectionHandler

      public ListCollectionHandler()
  • Method Details

    • copy

      public List copy(BeanMapper beanMapper, Class collectionElementClass, List source, List target)
      Description copied from interface: CollectionHandler
      Takes all the content from source and offers it to target. Every item is handled by BeanMapper before it is stored in target.
      Parameters:
      beanMapper - the beanmapper to use for mapping the individual items
      collectionElementClass - the class of an item within the target collection
      source - the source collection of items
      target - the target collection where the mapped source items will end up
      Returns:
      the target collection
    • size

      public int size(List targetCollection)
    • clear

      protected void clear(List target)
      Description copied from class: AbstractCollectionHandler
      Calls the clear method on the target collection
      Specified by:
      clear in class AbstractCollectionHandler<List>
      Parameters:
      target - the collection to call clear() on
    • create

      protected List create()
      Description copied from class: AbstractCollectionHandler
      Creates a new instance of the collection class
      Specified by:
      create in class AbstractCollectionHandler<List>
      Returns:
      new instance of the collection class