www.ctrt.net > guAvA oBjECt to mAp

guAvA oBjECt to mAp

假设有某个类如下 class Movie { private Integer rank; private String description; public Movie(Integer rank, String description) { super(); this.rank = rank; this.description = description; } public Integer getRank() { return rank;

// 得到keysList keys = new ArrayList();// 得到valuesList values = new ArrayList();// MapMap rs = new LinkedHashMap();// 确保以最小的list集合长度为rs的长度, 防止 NullPointerException 异常int keyLen = (keys != null) ? keys.size()...

网站地图

All rights reserved Powered by www.ctrt.net

copyright ©right 2010-2021。
www.ctrt.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com