// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

js> var map = new java.util.HashMap();
js> map.put("a","hi");
null
js> map.put("b","hi");
null
js> map.get("a") == map.get("b")
true
js> map.put("c",1)
null
js> map.put("c",1)
1.0
js> map.put("d",1)
null
js> map.get("c") == map.get("d")
true
js> map.get("a") == map.get("d")
false
js> map.put("e","1")
null
js> map.get("d") == map.get("e")
true
js> map.put("f", true)
null
js> map.put("g", true)
null
js> map.get("f") == map.get("g")
true
js> var obj = {}
js> map.put("h", obj)
null
js> map.put("i", obj)
null
js> map.get("h") == map.get("i")
true
js> map.put("j", {})
null
js> map.get("i") == map.get("j")
false