creating Object equality "HashMap" in ActionScript3 as java HashMap
- by jason
const jonny1 : Person = new Person("jonny", 26);
const jonny2 : Person = new Person("jonny", 26);
const table : Dictionary = new Dictionary();
table[jonny1] = "That's me";
trace(table[jonny1]) // traces: "That's me"
trace(table[jonny2]) // traces: undefined.
But I want use Dictionary like this way:
trace(table[jonny2]) // traces: "That's me".
in a word, I want implements a data-structure works like HashMap in java