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;

没有直接的一个键多个值的,但google的guava库有个multimap可以,或者自己声明一个值类型为List的Map

网站地图

All rights reserved Powered by www.ctrt.net

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