Implementation of Algebraic Data Types in Java.