Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!f17g2000prf.googlegroups.com!not-for-mail From: lewbloch Newsgroups: comp.lang.java.programmer Subject: Re: Generics for a multiplevalue hashmap Date: Thu, 21 Jul 2011 15:30:40 -0700 (PDT) Organization: http://groups.google.com Lines: 22 Message-ID: <71884899-d3c1-40e3-87a3-e184c34352b3@f17g2000prf.googlegroups.com> References: <295b693a-1ba9-454f-965b-d33fc4d43731@glegroupsg2000goo.googlegroups.com> <4e2896da$0$309$14726298@news.sunsite.dk> NNTP-Posting-Host: 172.19.12.96 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1311287555 3180 127.0.0.1 (21 Jul 2011 22:32:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 21 Jul 2011 22:32:35 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f17g2000prf.googlegroups.com; posting-host=172.19.12.96; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ASELCHRU X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.56 Safari/535.1,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6371 Arne Vajh=F8j wrote: > Richard wrote: >> I have done this > >> public class MultipleValueHashMap =A0 implements Map> =A0{ > >> I want to implement Map rather than extend HashMap as per Josh Bloch's E= ffective Java item 16.http://java.sun.com/docs/books/effective/toc.html > >> So I do not want to do this. >> public class MM2 =A0extends HashMap> =A0 { >> } > > Note the word "favor". > > You should evaluate not just choose without thinking. At the very least, consider extending java.util.AbstractMap. -- Lew