Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement HashMap in GWT?

Tags:

gwt

I have some amount of messages which are coming to my client from the server. Every messages have an unique key which is possible to be duplicated in messages I have already received. Which collection can I use in GWT to avoid duplication? HashMap seems not to be a case for GWT. Is there any other way to organize it?

like image 999
user539568 Avatar asked Apr 08 '11 09:04

user539568


2 Answers

You can use the standard java.util.HashMap in GWT without problems. Be sure you haven't accidentally imported the com.google.gwt.dev.util.collect.HashMap. It happened to me several times while using Eclipse's Organize imports feature..

like image 190
janhink Avatar answered Oct 05 '22 04:10

janhink


For questions like this, you should take a look at the GWT JRE Emulation Reference. It contains the java classes of the Java runtime library that can be automatically translated by GWT. The link points to the JRE ER for GWT 1.6. to show you that HashMap wasn't just included in the latest version. (The JRE ER for the latest version can be found here)

like image 29
xor_eq Avatar answered Oct 05 '22 02:10

xor_eq