java是否具有像c ++ STL中的那样的multiset数据结构? [英] Does java has multiset data structure like the one in c++ STL?

查看:2006
本文介绍了java是否具有像c ++ STL中的那样的multiset数据结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个像STL multiset一样的数据结构,但Java中的TreeSet不允许重复的元素。 Java中是否有内置数据结构,相当于multiset?

I need a data structure which works like the STL multiset but the TreeSet in Java doesn't allow duplicate elements. Is there any built-in data structure in Java which is equivalent to multiset ?

推荐答案

标准Java库中没有Multiset。您应该使用包含Multiset类的Google Guava框架。

There is no Multiset in the standard Java libraries. You should use the Google Guava framework which contains Multiset classes. See

这篇关于java是否具有像c ++ STL中的那样的multiset数据结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆