If you're interested in functional programming, you might also want to checkout my second blog which i'm actively working on!!

Tuesday, April 6, 2010

When enums are not an option

I had to write some code for JDK1.4 which does not support enums. Below you will find some way to achieve enumeration like functionality.

The first thing I did was creating an empty marker interface.


Next I wrote a DataTypeFactory which exposes final DataTypes.

No comments:

Post a Comment