(), , Eclipse Collections API. :
Map<String, TreeSet<String>> jdkMap = new HashMap<>();
jdkMap.put("one", new TreeSet<>(Comparator.reverseOrder()));
jdkMap.computeIfAbsent("two", key -> new TreeSet<>(Comparator.reverseOrder()));
MutableMap<String, TreeSet<String>> ecMap =
Maps.mutable.with("one", new TreeSet<>(Comparator.reverseOrder()));
ecMap.getIfAbsentPutWith("two", TreeSet::new, Comparator.<String>reverseOrder());
Assert.assertEquals(jdkMap, ecMap);
JDK Map.computeIfAbsent(), Function , Eclipse Collections 'MutableMap.getIfAbsentPutWith(), Function, . JDK . TreeSet::new Comparator.<String>reverseOrder() , .
*With, Eclipse (, selectWith, rejectWith, collectWith, detectWith, anySatisfyWith ..). , Java 8.
, Eclipse Collections Katas.
Kata → 2
Pet Kata → 2
. Eclipse.