Generates Java code for Comparable/Comparator
Comparator cutter is an applet that generates custom java code to implement comparable/comparator. The applet lets you provide a few facts about the comparable or comparator you want and the comparatorcutter generates you well-commented java source code to include in your own programs.
It ask you the name of the comparator class, the name of the class of objects you are comparing, the names and types of the fields to sort/compare the objects, and whether you want ascending/descending order for each field. If you want code that will handle null sort keys, tick off null safe.
You can also run the applet online at the mindprod site without installing it. Why the striped triangle icon? It is supposed to represent items sorted in descending order. Each bar is a litter shorter than the previous.