I wanted something like Haskell's Algebraic Data Type in my daily Java programming. http://www.haskell.org/haskellwiki/Algebraic_data_type
After a bit of Googling and hacking, I found it wasn't that hard to do. Unfortunately it requires a bit more code then in Haskell. Oh well..
Anyways, take a look at the test to see how you'd use it.