add setIndex() method

This commit is contained in:
Ben Fry
2017-10-10 20:34:40 -04:00
parent 28ee67ff22
commit 2327009d88
3 changed files with 29 additions and 0 deletions
+9
View File
@@ -346,6 +346,15 @@ public class FloatDict {
}
public void setIndex(int index, String key, float value) {
if (index < 0 || index >= count) {
throw new ArrayIndexOutOfBoundsException(index);
}
keys[index] = key;
values[index] = value;
}
/**
* @webref floatdict:method
* @brief Check if a key is a part of the data structure