I have Table like Table<String, String, String> distributions = HashBasedTable.create();
|----------------------------------------------|
| Row | Column | Value |
|----------------------------------------------|
| aaa | a | Hard Rock |
| aaa | n | Art Pop |
| abc | b | Surrealist Film |
| abc | c | Blockbuster |
|----------------------------------------------|
My Column values are all unique but my Row values can be repeated.
so How can I get all the Column keys given a Row key?
You can use
Table.rowMap()to get "a view that associates each row key with the corresponding map from column keys to values"; the view is aMapand itskeySet()contains all of theColumnkeys for a givenRowkey: