code: public static <E> Collection<E> collectify(ObjectMapper mapper, Object source, Class<? extends Collection> targetCollectionType, Class<E> targetElementType) {
          CollectionType collectionType = mapper.getTypeFactory().constructCollectionType(targetCollectionType, targetElementType);
          return objectify(mapper, convertToCollection(source), collectionType);
      }
docs: Convert an object to a collection.
  
  @param mapper               the object mapper
  @param source               the source object
  @param targetCollectionType the target collection type
  @param targetElementType    the target collection element type
  @return collection