check on indices settings for the other Dict classes

This commit is contained in:
Ben Fry
2014-04-11 13:35:34 -04:00
parent 01fb49f172
commit 16e972f674
3 changed files with 2 additions and 7 deletions

View File

@@ -76,14 +76,11 @@ public class IntDict {
* @nowebref
*/
public IntDict(BufferedReader reader) {
// public IntHash(PApplet parent, String filename) {
String[] lines = PApplet.loadStrings(reader);
keys = new String[lines.length];
values = new int[lines.length];
// boolean csv = (lines[0].indexOf('\t') == -1);
for (int i = 0; i < lines.length; i++) {
// String[] pieces = csv ? Table.splitLineCSV(lines[i]) : PApplet.split(lines[i], '\t');
String[] pieces = PApplet.split(lines[i], '\t');
if (pieces.length == 2) {
keys[count] = pieces[0];