HCOLL-119 removed the use of " public <K, V> SharedHashMap<K, V> create(File file, Class<K> kClass, Class<V> vClass) "

This commit is contained in:
Rob Austin
2014-07-24 14:19:51 +01:00
parent ca899a90e2
commit 006a874ae2
4 changed files with 34 additions and 9 deletions
@@ -106,7 +106,8 @@ public interface ChronicleMap<K, V> extends SharedHashMap<K, V>, ConcurrentMapLa
*/
default void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
Objects.requireNonNull(function);
forEach((k, v) -> {
final BiConsumer<K, V> action = (k, v) -> {
while (!replace(k, v, function.apply(k, v))) {
// v changed or k is gone
if ((v = get(k)) == null) {
@@ -114,7 +115,9 @@ public interface ChronicleMap<K, V> extends SharedHashMap<K, V>, ConcurrentMapLa
break;
}
}
});
};
forEach(action);
}
/**