Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #6359
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!news.tele.dk!feed118.news.tele.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail |
|---|---|
| Date | Thu, 21 Jul 2011 17:15:02 -0400 |
| From | Arne Vajhøj <arne@vajhoej.dk> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Generics for a multiplevalue hashmap |
| References | <295b693a-1ba9-454f-965b-d33fc4d43731@glegroupsg2000goo.googlegroups.com> |
| In-Reply-To | <295b693a-1ba9-454f-965b-d33fc4d43731@glegroupsg2000goo.googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Lines | 18 |
| Message-ID | <4e2896da$0$309$14726298@news.sunsite.dk> (permalink) |
| Organization | SunSITE.dk - Supporting Open source |
| NNTP-Posting-Host | 72.192.23.157 |
| X-Trace | news.sunsite.dk DXC=^<K8j6>gM?SPJU4WZUlGaXYSB=nbEKnk[@IQ>cfbXVeVJPe3\kP5EUQKBm9cfh9BSTM2;kT<[:>[Q\W[IVm<J>DS^Ec56@C52[S |
| X-Complaints-To | staff@sunsite.dk |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6359 |
Show key headers only | View raw
On 7/19/2011 4:32 PM, Richard wrote:
> I have done this
>
> public class MultipleValueHashMap<T, U> implements Map<T, java.util.List<U>> {
>
> I want to implement Map rather than extend HashMap as per Josh Bloch's Effective Java item 16. http://java.sun.com/docs/books/effective/toc.html
>
> So I do not want to do this.
> public class MM2<T,U> extends HashMap<T, List<U>> {
> }
Note the word "favor".
You should evaluate not just choose without thinking.
Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Generics for a multiplevalue hashmap Richard <iamrichardjones@gmail.com> - 2011-07-19 13:32 -0700
Re: Generics for a multiplevalue hashmap Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 17:15 -0400
Re: Generics for a multiplevalue hashmap lewbloch <lewbloch@gmail.com> - 2011-07-21 15:30 -0700
csiph-web