Closed GoogleCodeExporter closed 9 years ago
We don't want to support TreeMap(Map) with an arbitrary Map. Someone could
provide a map without a comparator whose keys aren't comparable. The JDK has
such a method for compatibility with the pre-generic API.
Either of the following methods is feasible, but I don't think we should add
more newTreeMap overloads.
static <C, K extends C, V> TreeMap<K,V> newTreeMap(Comparator<C> comparator,
Map<? extends K, ? extends V)
static <K extends Comparable,V> TreeMap<K,V> newTreeMap(Map<? extends K, ?
extends V>)
Original comment by jared.l....@gmail.com
on 14 Feb 2011 at 10:48
Slightly related: http://code.google.com/p/guava-libraries/issues/detail?id=535
Original comment by nev...@gmail.com
on 14 Feb 2011 at 11:35
Original comment by kevin...@gmail.com
on 19 Feb 2011 at 11:49
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 3 Nov 2014 at 9:09
Original issue reported on code.google.com by
yogy.nam...@gmail.com
on 9 Feb 2011 at 7:09