Closed GoogleCodeExporter closed 9 years ago
I agree with all this in concept.
In practice it could be ugly. Either we return an unmodifiable wrapper of a
plain
EnumMap, or we'll have to re-engineer portions of EnumMap.
We might not do this because I think Josh plans to support immutable EnumMaps
in JDK
7. If he does, I will suggest that he add the optional exhaustive check.
Original comment by kevin...@gmail.com
on 17 Mar 2009 at 5:30
Original comment by kevin...@gmail.com
on 13 Aug 2009 at 2:52
For this ImmutableEnumMap and its exhaustive Builder I suggest a support method
somewhere, that takes as an argument a Function<K extends Enum<K>, V> to
compute the
values of the ImmutableEnumMap during creation. Suppose something like this:
ImmutableEnumMap.<MyEnum, Value>builder()
.forEnum(MyEnum.class) // makes it exhaustive
.computeValues(new Function<MyEnum, Value>() { ... })
.build();
or maybe:
ImmutableEnumMap.<MyEnum, Value> create(MyEnum.class, new Function<MyEnum,
Value>()
{...});
Original comment by Robin...@gmail.com
on 13 Aug 2009 at 5:07
Original comment by kevin...@gmail.com
on 17 Sep 2009 at 5:45
Original comment by kevin...@gmail.com
on 17 Sep 2009 at 5:57
This issue has been moved to the Guava project (keeping the same id number).
Simply replace 'google-collections' with 'guava-libraries' in your address
bar and it should take you there.
Original comment by kevinb@google.com
on 5 Jan 2010 at 11:09
Original issue reported on code.google.com by
gk5...@gmail.com
on 15 Jul 2008 at 4:38