user3903214
user3903214

Reputation: 203

Iterate per row, Guava HashBasedTable

How do I get all columns per row in a HashBasedTable? I initialized it this way:

Table<String, String, Integer> table = HashBasedTable.create();

I want to sum all the values mapped to each row.

Upvotes: 3

Views: 1715

Answers (1)

Louis Wasserman
Louis Wasserman

Reputation: 198123

If you call table.row(r), you'll get a Map from columns to values that you can call entrySet(), or values(), on.

Upvotes: 5

Related Questions