i < s.length; i++) {
var item = s[i];
if (item && typeof item == "object") {
omap.set(item, i);
} else {
pmap[item] = i;
}
}
},
add: function(item) {
var key = this.store.push(item) - 1;
if (item && typeof item == "object") {
this.omap.set(item, key);
} else {
this.pmap[item] = key;
}
return key;
},
removeKey: function(key) {
this._removeFromMap(this.store[key]);
delete this.store[key];
},
_removeFromMap: function(item) {
if (typeof item == "object") {
this.omap.delete(item);
} else {
delete this.pmap[item]