Closed GoogleCodeExporter closed 9 years ago
Original comment by kevinb@google.com
on 12 Jan 2011 at 10:29
Original comment by kevinb@google.com
on 13 Jul 2011 at 6:18
Original comment by fry@google.com
on 10 Dec 2011 at 3:58
Original comment by fry@google.com
on 16 Feb 2012 at 7:17
Do we have a particular use case for this?
Original comment by wasserman.louis
on 23 Feb 2012 at 7:35
Is there anything about this that isn't satisfied by ImmutableTable, which
preserves insertion order?
Original comment by wasserman.louis
on 5 Apr 2012 at 4:07
You mean insertion order through the builder API?
Only the obvious, that you might want a mutable one which preserves order of
mutations.
Original comment by joe.j.kearney
on 5 Apr 2012 at 5:31
Rephrase: do we have any known real-world use cases that aren't answered by
ImmutableTable.
Original comment by wasserman.louis
on 5 Apr 2012 at 5:38
Original comment by kevinb@google.com
on 30 May 2012 at 7:43
Original comment by kevinb@google.com
on 22 Jun 2012 at 6:16
We have an ANTLR parser which inserts a new Row in every iteration.
ImmutableMap doesn't fit here.
Original comment by robbin.a...@gmail.com
on 28 Aug 2013 at 9:51
I have a real world example for this.
We have a POJO which executes a PreparedStatement, parses the ResultSet with a
bit of business logic and stores it in a Table to pass back to the caller. The
PreparedStatement includes an ORDER BY clause in the sql, but the Table's
ordering tramples the sql ordering.
Since the ResultSet will vary based on the parameters passed to
PreparedStatement (as well as the DB contents at runtime), ImmutableTable
doesn't make sense.
The alternative would be to have the POJO pass the raw ResultSet back to the
caller, but then we would need to do the parsing/business logic inside the
caller instead of encapsulating it in the POJO.
Another alternative would be to construct a different row/column key that can
be sorted in a TreeBasedTable (or even use indices of an ArrayBasedTable), but
that seems a bit code-smelly as we would need to maintain the map of the
sort-friendly keys/indices to the real keys. The caller would also need to know
about the mapping of fake keys to real keys.
Original comment by m...@giltaji.com
on 14 Oct 2013 at 11:11
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:15
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:18
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:09
Original issue reported on code.google.com by
joe.j.kearney
on 13 Dec 2010 at 6:10Attachments: