bug fixing on Dict and List classes, add Iterable constructor

This commit is contained in:
Ben Fry
2013-05-01 14:54:54 -04:00
parent 2bc1cce04d
commit f8d25375cc
7 changed files with 37 additions and 1 deletions

View File

@@ -93,6 +93,9 @@ public class IntDict {
this.keys = keys;
this.values = values;
count = keys.length;
for (int i = 0; i < count; i++) {
indices.put(keys[i], i);
}
}
@@ -104,6 +107,7 @@ public class IntDict {
/** Remove all entries. */
public void clear() {
count = 0;
indices = new HashMap<String, Integer>();
}