标签:com get gen home types 地址 size 集合 span
return (List<Customer>) list;
List<Object>
to List<Customer>
you can always cast any object to any type by up-casting it to Object first. in your case:
(List<Customer>)(Object)list;
将List<Object>强制转换成Object,然后再转换为实体集合!
地址:https://stackoverflow.com/questions/1917844/how-to-cast-listobject-to-listmyclass
you must be sure that at runtime the list contains nothing but Customer objects.
How to cast List<Object> to List<MyClass> Object集合转换成实体集合
标签:com get gen home types 地址 size 集合 span
原文地址:http://www.cnblogs.com/SimonHu1993/p/7097218.html