Class SetCollectionHandler

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

public class SetCollectionHandler extends AbstractCollectionHandler<Set>
  • Constructor Details

    • SetCollectionHandler

      public SetCollectionHandler()
  • Method Details

    • copy

      public Set copy(BeanMapper beanMapper, Class collectionElementClass, Set source, Set 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(Set targetCollection)
    • clear

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

      protected Set create(Class<?> collectionElementType)
      Overrides:
      create in class AbstractCollectionHandler<Set>
    • create

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