Comparators. Some are at Apache Commons Collections. BeanComparator is very nice.