Closed GoogleCodeExporter closed 9 years ago
Here is the way to use valueOf with the Language enum - the string is the name
of the
constant, not the parameter it was initialized with.
Language result = Language.ENGLISH;
Language result2 = Language.valueOf(Language.class, "ENGLISH");
assertEquals("Language.ENGLISH", result, result2);
If you want to lookup by lang code, you'll have to search Language.values() or
construct a lookup table from Language.values().
Original comment by galgwt.reviews@gmail.com
on 5 Jun 2009 at 3:31
Now I understand this enumeration. Will it be possible to provide some utility
method which can return the
Language enum (Language.ENGLISH) by giving locale ISO code("en")? If so, it
will be very useful to use with GWT
locale implementation.
Original comment by benzhe...@gmail.com
on 11 Jun 2009 at 7:37
Original issue reported on code.google.com by
benzhe...@gmail.com
on 25 May 2009 at 5:51