Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #6273
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe15.iad.POSTED!8ad76e89!not-for-mail |
|---|---|
| From | Arved Sandstrom <asandstrom3minus1@eastlink.ca> |
| User-Agent | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Generics for a multiplevalue hashmap |
| References | <2f4c5543-ceef-4cdb-8ff7-b978f30766e0@glegroupsg2000goo.googlegroups.com> |
| In-Reply-To | <2f4c5543-ceef-4cdb-8ff7-b978f30766e0@glegroupsg2000goo.googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| Lines | 19 |
| Message-ID | <FO3Vp.38930$Mo3.19073@newsfe15.iad> (permalink) |
| X-Complaints-To | abuse@newsgroups-download.com |
| NNTP-Posting-Date | Tue, 19 Jul 2011 00:00:37 UTC |
| Organization | Public Usenet Newsgroup Access |
| Date | Mon, 18 Jul 2011 21:00:37 -0300 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6273 |
Show key headers only | View raw
On 11-07-18 06:31 PM, Alexis Berry wrote: > Hello, > > I want to create a HashMap which has a list for each key. Therefore I can store more than one value for each key. (I know this breaks the true use of a hashmap but I want a datastruture that takes one key and hold multiple value) > Why does it break the "true use" of a hashmap? The use of a map or dictionary or associative array - whatever you choose to call it - is to relate a collection of keys and values such that each key is associated with a value. That value may be anything, including a list or set of values. As it happens a map which has lists or sets as values is a typical implementation of a so-called multimap. Good multimap interfaces make the implementation easier to use but don't hide it much. See the Wikipedia entry on multimap for some references to implementations. I won't address the rest of the post because others will already be all over it. :-) AHS
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Generics for a multiplevalue hashmap Alexis Berry <iamrichardjones@gmail.com> - 2011-07-18 14:31 -0700
Re: Generics for a multiplevalue hashmap markspace <-@.> - 2011-07-18 14:40 -0700
Re: Generics for a multiplevalue hashmap Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-07-18 21:00 -0300
Re: Generics for a multiplevalue hashmap Arne Vajhøj <arne@vajhoej.dk> - 2011-07-18 23:01 -0400
Re: Generics for a multiplevalue hashmap Roedy Green <see_website@mindprod.com.invalid> - 2011-07-19 03:59 -0700
Re: Generics for a multiplevalue hashmap Esmond Pitt <esmond.pitt@bigpond.com> - 2011-07-19 22:24 +1000
Re: Generics for a multiplevalue hashmap markspace <-@.> - 2011-07-19 08:31 -0700
csiph-web