HCOLL-234 as agreeded changed method name to "putWithMapping()"

This commit is contained in:
Rob Austin
2014-12-09 12:07:15 +00:00
parent 91bc848127
commit 2df0426d83
7 changed files with 21 additions and 26 deletions
@@ -559,7 +559,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
}
@Override
public <R> R updateForKey(K key, @NotNull Mutator<? super V, R> mutator) {
public <R> R putWithMapping(K key, @NotNull Mutator<? super V, R> mutator) {
if (!(CharSequence.class.isAssignableFrom(vClass))) {
@@ -573,7 +573,8 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
if (!entry.wasPresent())
return null;
return mutator.update(entry.value());
R result = mutator.update(entry.value());
((MutableLockedEntry) entry).value(result);
}
}