Java,Lambda:如何从不同类型的列表集合中查找列表?
在Java8中,从列表列表中获取元素为Type1
的列表的最佳方法是什么->;(记录){List<Type1>, List<Type2>, List<Type3>, ...}
记录有多个不同类型的列表->{List<Type1>, List<Type2>, List<Type3>, ...}
List<T> getList(T t) {
// t is instance of Type1
return Records -> List<t>;
}
非常感谢你的帮助
# 1 楼答案