我如何为java导入multimap? [英] how do i import multimap for java?

查看:161
本文介绍了我如何为java导入multimap?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个愚蠢的,但是如何安装 MultiMap

This is kind of stupid but how do I install MultiMap?

我需要一种方法来存储密钥的多个值,而我的地图实现不起作用

I need a way to store multiple values to keys and my map implementation isn't working

推荐答案

该类 MultiMap 不是Java标准库的一部分。它是 Apache Commons 的一部分,这是许多Java开发人员发现有用的一组单独的实用程序类。可以在番石榴中使用备用的 Multimap 实现(我建议) ,Google的实用程序库。

That class, MultiMap, is not part of the Java standard library. It is part of Apache Commons, a separate set of utility classes many Java developers find useful. An alternate Multimap implementation (which I would recommend) is available in Guava, Google's utility library.

在这两种情况下,为了使用这些类,您需要下载项目分发的jar,并将其添加到你的类路径,当你运行你的程序。您可以在命令行中执行此操作:将jar包含在classpath中命令行(javac或apt)或Eclipse中:添加JAR到Eclipse Java库

In either case, in order to use these classes, you need to download the jar distributed by the project, and add it to your classpath when you run your program. You can do this at the command line: Including jars in classpath on commandline (javac or apt) or in Eclipse: Adding a JAR to an Eclipse Java library

如果您的Google针对安装jar和将jar添加到eclipse等短语,您会发现许多资源来帮助如果你仍然在努力,你就会这样。

If you Google for phrases like "installing jars" and "adding jars to eclipse" you'll find many resources to help you if you're still struggling.

这篇关于我如何为java导入multimap?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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