Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #6293

Re: Generics for a multiplevalue hashmap

From Richard <iamrichardjones@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Generics for a multiplevalue hashmap
Date 2011-07-19 13:32 -0700
Organization http://groups.google.com
Message-ID <295b693a-1ba9-454f-965b-d33fc4d43731@glegroupsg2000goo.googlegroups.com> (permalink)

Show all headers | View raw


Thanks for all your replies.

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>>  {
}

Thanks for all your help. I will look into some of the other answers later in the week.

Many thanks
Richard

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar


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