Another experiment in Java.  An exercise in types and generics