class Student{
int id;
String name;
int age;
public Student(int id, String name, int age) {
this.id = id;
this.name = name;
this.age = age;
}
}
public static List
解决方法:
您可以在java-8流中完成
List objList = csvStudentData.stream()
.flatMap(map->map.entrySet()
.stream()
.map(entry->insertObjectData(st.getClass(), entry.getKey(), entry.getValue())))
.collect(Collectors.toList());