If the comparator is associated with the relevant class only (or even strongly associated with it..), it makes organisational sense to include it as a nested class.
Look at the field CASE_INSENSITIVE_ORDER in the
String class, which is a Comparator. This is implemented as a static nested class. (Check the Open JDK String class
source)
[ November 05, 2008: Message edited by: Gamini Sirisena ]