Moved DefaultValueProvider to the new Contexts API; removed defaultValue() SPI from MapEntryOperations (essentially replaced by DefaultValueProvider); Removed the old contexts, KeyContext and MapKeyContext completely

This commit is contained in:
leventov
2015-07-24 21:36:55 +03:00
parent 9fe1dab477
commit 340ab09409
23 changed files with 89 additions and 389 deletions
@@ -150,15 +150,4 @@ public interface MapEntryOperations<K, V, R> {
absentEntry.doInsert(value);
return null;
}
/**
* Returns the "nil" value, which should be inserted into the map, in the given
* {@code absentEntry} context. This is primarily used in {@link ChronicleMap#acquireUsing}
* operation implementation, i. e. {@link MapMethods#acquireUsing}.
*
* @implNote simply delegates to {@link MapAbsentEntry#defaultValue()}.
*/
default Data<V> defaultValue(@NotNull MapAbsentEntry<K, V> absentEntry) {
return absentEntry.defaultValue();
}
}