get keys methods

This commit is contained in:
Val Erastov 2015-11-20 00:52:38 -08:00
parent a9f0f1aec4
commit 56d9c8ab48

View file

@ -69,6 +69,14 @@ TCAD.struct.HashTable.prototype.rebuild = function() {
}
};
TCAD.struct.HashTable.prototype.getKeys = function() {
var keys = [];
this.entries(function(k) {
keys.push(k)
});
return keys;
};
TCAD.struct.HashTable.prototype.entries = function(callback) {
for (var i = 0; i < this.table.length; i++) {
var e = this.table[i];