Class CollectionConverter<T>

java.lang.Object
io.beanmapper.core.converter.collections.CollectionConverter<T>
All Implemented Interfaces:
BeanConverter

public class CollectionConverter<T> extends Object implements BeanConverter
  • Constructor Details

    • CollectionConverter

      public CollectionConverter(CollectionHandler<T> collectionHandler)
  • Method Details

    • convert

      public T convert(BeanMapper beanMapper, Object source, Class<?> targetClass, BeanPropertyMatch beanPropertyMatch)
      Description copied from interface: BeanConverter
      Converts the source instance into the desired target type.
      Specified by:
      convert in interface BeanConverter
      Parameters:
      beanMapper - the instance of BeanMapper to use for further mappings
      source - the source instance
      targetClass - the desired target type
      beanPropertyMatch - information on the field pair (source / target)
      Returns:
      the converted source instance
    • match

      public boolean match(Class<?> sourceClass, Class<?> targetClass)
      Description copied from interface: BeanConverter
      Determines if the conversion of our source type to a target type is supported by this converter.
      Specified by:
      match in interface BeanConverter
      Parameters:
      sourceClass - the source class
      targetClass - the target class
      Returns:
      true if the conversion is supported, else false