3

I have used table guava for my 3D implementation of hash, I just wanted to know like how to iterate that and fetch the values. I have the below in my table now .. I just have to traverse this and print the value of row, column, value

  A1000|B100|8
  A104|B10|6

1 Answer 1

9
for (Table.Cell<String, String, Integer> cell : table.cellSet()) {
    System.out.println(cell.getRowKey 
                       + "|"
                       + cell.getColumnKey() 
                       + "|" 
                       + cell.getValue());
}

The javadoc would have told you, as well as the linked user guide article.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.