mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Add ChronicleMap.of() as a shortcut to ChronicleMapBuilder.of()
This commit is contained in:
@@ -55,6 +55,19 @@ public interface ChronicleMap<K, V> extends ConcurrentMap<K, V>,
|
||||
ChronicleHash<K, MapEntry<K, V>, MapSegmentContext<K, V, ?>,
|
||||
ExternalMapQueryContext<K, V, ?>> {
|
||||
|
||||
/**
|
||||
* Delegates to {@link ChronicleMapBuilder#of(Class, Class)} for convenience.
|
||||
*
|
||||
* @param keyClass class of the key type of the Chronicle Map to create
|
||||
* @param valueClass class of the value type of the Chronicle Map to create
|
||||
* @param <K> the key type of the Chronicle Map to create
|
||||
* @param <V> the value type of the Chronicle Map to create
|
||||
* @return a new {@code ChronicleMapBuilder} for the given key and value classes
|
||||
*/
|
||||
static <K, V> ChronicleMapBuilder<K, V> of(Class<K> keyClass, Class<V> valueClass) {
|
||||
return ChronicleMapBuilder.of(keyClass, valueClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value to which the specified key is mapped, or {@code null} if this map contains
|
||||
* no mapping for the key.
|
||||
|
||||
Reference in New Issue
Block a user