An easy way to generate an cascading configurable comparator in Java