On 29 Nov 2011, at 10:43, Tristan Tarrant wrote:
On 11/29/2011 11:28 AM, Bela Ban wrote:
> Yes, I thought about this too, but then trashed the idea because enums
> take up too much memory. Since an enum is a class, and an enum instance
> is an instance (although a singleton / classloader instance), we have
Why, you would just use the Enum when setting and getting, but otherwise
just store your internal representation.
Yes thats what I meant. This way the internal representation can change from version to
version if needed, and still shield users from API change. Plus enums from an API
standpoint is cleaner/nicer, and good enough a reason to do so.
--
Manik Surtani
manik(a)jboss.org
twitter.com/maniksurtani
Lead, Infinispan
http://www.infinispan.org