HashMap savedStuff = new HashMap();
savedStuff.put("symbol", this.symbol); //this is a string
savedStuff.put("index", this.index); //this is an int
gives me the warning:
HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized
HashMap<String, Object> savedStuff = new HashMap<String, Object>();
Of course, you will still have to be careful to use the right type when extracting elements.