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?
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..
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With