Package io.beanmapper.core.collections
Class ListCollectionHandler
java.lang.Object
io.beanmapper.core.collections.AbstractCollectionHandler<List>
io.beanmapper.core.collections.ListCollectionHandler
- All Implemented Interfaces:
CollectionHandler<List>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Calls the clear method on the target collectioncopy
(BeanMapper beanMapper, Class collectionElementClass, List source, List target) Takes all the content from source and offers it to target.protected List
create()
Creates a new instance of the collection classint
Methods inherited from class io.beanmapper.core.collections.AbstractCollectionHandler
create, getGenericParameterIndex, getTargetCollection, getType, isMatch, mapItem
-
Constructor Details
-
ListCollectionHandler
public ListCollectionHandler()
-
-
Method Details
-
copy
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 itemscollectionElementClass
- the class of an item within the target collectionsource
- the source collection of itemstarget
- the target collection where the mapped source items will end up- Returns:
- the target collection
-
size
-
clear
Description copied from class:AbstractCollectionHandler
Calls the clear method on the target collection- Specified by:
clear
in classAbstractCollectionHandler<List>
- Parameters:
target
- the collection to call clear() on
-
create
Description copied from class:AbstractCollectionHandler
Creates a new instance of the collection class- Specified by:
create
in classAbstractCollectionHandler<List>
- Returns:
- new instance of the collection class
-