package com.changfa.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import org.springframework.beans.BeanUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.function.Supplier;

public class ColaBeanUtils {
    private static ColaBeanUtils colaBeanUtils;
    public static ColaBeanUtils instance(){
        if(colaBeanUtils == null){
            return new ColaBeanUtils();
        }
        return colaBeanUtils;
    }

    /**
     * map转list实体
     * @param list
     * @param e
     * @return
     */
    /*public  List<T> convertEntity(List<Object> list,T e){
        List<T> entityList= JSON.parseObject(JSON.toJSONString(list), new TypeReference<List<T>>() {});
        return entityList;
    }*/
}