Package io.beanmapper.core.collections
Class SetCollectionHandler
java.lang.Object
io.beanmapper.core.collections.AbstractCollectionHandler<Set>
io.beanmapper.core.collections.SetCollectionHandler
- All Implemented Interfaces:
CollectionHandler<Set>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Calls the clear method on the target collectioncopy
(BeanMapper beanMapper, Class collectionElementClass, Set source, Set target) Takes all the content from source and offers it to target.protected Set
create()
Creates a new instance of the collection classprotected Set
int
Methods inherited from class io.beanmapper.core.collections.AbstractCollectionHandler
getGenericParameterIndex, getTargetCollection, getType, isMatch, mapItem
-
Constructor Details
-
SetCollectionHandler
public SetCollectionHandler()
-
-
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<Set>
- Parameters:
target
- the collection to call clear() on
-
create
- Overrides:
create
in classAbstractCollectionHandler<Set>
-
create
Description copied from class:AbstractCollectionHandler
Creates a new instance of the collection class- Specified by:
create
in classAbstractCollectionHandler<Set>
- Returns:
- new instance of the collection class
-