diff --git a/core/src/processing/data/Table.java b/core/src/processing/data/Table.java index 796491dc5..4f6ede76c 100644 --- a/core/src/processing/data/Table.java +++ b/core/src/processing/data/Table.java @@ -4440,6 +4440,19 @@ public class Table { } + /** + * Return a mapping that connects the entry from a column back to the row + * from which it came. For instance: + *
+   * Table t = loadTable("country-data.tsv", "header");
+   * // use the contents of the 'country' column to index the table
+   * Map lookup = t.getRowMap("country");
+   * // get the row that has "us" in the "country" column:
+   * TableRow usRow = lookup.get("us");
+   * // get an entry from the 'population' column
+   * int population = usRow.getInt("population");
+   * 
+ */ public Map getRowMap(int column) { Map outgoing = new HashMap<>(); for (int row = 0; row < getRowCount(); row++) { diff --git a/core/todo.txt b/core/todo.txt index 2a21450fa..1c7a3f316 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -5,7 +5,11 @@ X https://github.com/processing/processing/issues/4441 X Exceptions thrown in OpenGL apps when hitting window close box X https://github.com/processing/processing/issues/4690 X add getRowMap() function -_ do we want rows() to not be transient? +o do we want rows() to not be transient? +X write docs for getRowMap() +o Add options to saveJSONArray documentation (enhancement) +o https://github.com/processing/processing/issues/4683 +X made note in the docs repo contrib X Call glGetProgramiv to retrieve program log length @@ -32,8 +36,6 @@ X had to use JSONObject.quote() to wrap the text _ do the same for the other data classes _ note the difference between this and toJSONObject() or toJSONArray() _ or is that the better way to handle it? hm -_ Add options to saveJSONArray documentation (enhancement) -_ https://github.com/processing/processing/issues/4683 _ NPE thrown when using textMode(SHAPE) with a .vlw font _ https://github.com/processing/processing/issues/4680 diff --git a/todo.txt b/todo.txt index 42f05377e..ff80bb6e7 100755 --- a/todo.txt +++ b/todo.txt @@ -20,7 +20,7 @@ X fix extensions handling in CFBundleDocument code from appbundler X https://github.com/processing/processing/issues/4615 X update launch4j to 3.9 X https://sourceforge.net/projects/launch4j/files/launch4j-3/3.9/ -X launch4j bug with minimum JRE version (set to 102 for folks who have 101?) +X exported application doesn't work with latest jre X https://github.com/processing/processing/issues/4682 gohai