Comparator<String> (boolean ignoreCase) { if (ignoreCase) { if (icStrComparator == null) { icStrComparator = String.CASE_INSENSITIVE_ORDER; } return icStrComparator; } if (strComparator == null) { strComparator = Comparator.naturalOrder(); } return strComparator; }