boolean (Comparator choicesComparator, Comparator<String> stringComparator) { boolean same = this.strComparator.equals(stringComparator); if (same){ if (choicesComparator==null){ same = this.contentComparator==null; } else { same = choicesComparator.equals(this.contentComparator); } } this.contentComparator = choicesComparator; this.strComparator = stringComparator; return !same; }