int (TemplateImpl o1, TemplateImpl o2) { int compareKey = compareCaseInsensitively(o1.getKey(), o2.getKey()); return compareKey != 0 ? compareKey : compareCaseInsensitively(o1.getGroupName(), o2.getGroupName()); }