Templates

This library uses template extended Java classes. Some of the classes have been altered slightly, so that the advantages of C++  templates can be applied. Apart from compile-time type-safety, one advantage of templates is that redundant classes have eventually been removed now to reduce the conceptual weight.

With template classes of Generic Java, the user has the choice: 

  1. Template classes can either be used as ordinary Java classes with a conventional Java compiler working on generic-type Object, without any change to the source code.
  2. Alternatively, some part of the code can make use of templates by using the Generic Java compiler.

If you decide to use these enhanced template features, refer to the Generic Java home to get the Generic Java compiler and additional documentation about templates and reusing previous code with retrofitting.

See Also:
Java Specification Request, JSR 14: Adding Generics to the Java™ Programming Language, templates with Generic Java, templates with PolyJ, Generics from Sun.