How can you instantiate a Bimap
of Google-collections?
I've read the question Java: Instantiate Google Collection's HashBiMap
A sample of my code
import com.google.common.collect.BiMap;
public class UserSettings {
private Map<String, Integer> wordToWordID;
UserSettings() {
this.wordToWordID = new BiMap<String. Integer>();
I get cannot instantiate the type BiMap<String, Integer>
.
create
without parameters, like HashBiMap? – Irresponsible