diff --git a/src/main/java/net/openhft/chronicle/map/ChronicleMap.java b/src/main/java/net/openhft/chronicle/map/ChronicleMap.java index 2b698484f..2c6d70bb8 100755 --- a/src/main/java/net/openhft/chronicle/map/ChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/ChronicleMap.java @@ -55,6 +55,19 @@ public interface ChronicleMap extends ConcurrentMap, ChronicleHash, MapSegmentContext, ExternalMapQueryContext> { + /** + * 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 the key type of the Chronicle Map to create + * @param the value type of the Chronicle Map to create + * @return a new {@code ChronicleMapBuilder} for the given key and value classes + */ + static ChronicleMapBuilder of(Class keyClass, Class 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.