Class<K> keyType, Class<V> valueType) { return new CheckedMap<>(m, keyType, valueType);
Class<K> keyType, Class<V> valueType) { return new CheckedMap<>(m, keyType, valueType);
/** * Returns a dynamically typesafe view of the specified map. Trying to * insert an element of the wrong type into this map throws a * {@code ClassCastException}. At creation time the types in {@code m} are * not checked for correct type. * * @param m * the map to be wrapped in a typesafe map. * @param keyType * the type of the keys permitted to insert. * @param valueType * the type of the values permitted to insert. * @return a typesafe map. */ public static <K, V> Map<K, V> checkedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType) { return new CheckedMap<K, V>(m, keyType, valueType); }
/** * Returns a dynamically typesafe view of the specified map. Trying to * insert an element of the wrong type into this map throws a * {@code ClassCastException}. At creation time the types in {@code m} are * not checked for correct type. * * @param m * the map to be wrapped in a typesafe map. * @param keyType * the type of the keys permitted to insert. * @param valueType * the type of the values permitted to insert. * @return a typesafe map. */ public static <K, V> Map<K, V> checkedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType) { return new CheckedMap<K, V>(m, keyType, valueType); }
/** * Returns a dynamically typesafe view of the specified map. Trying to * insert an element of the wrong type into this map throws a * {@code ClassCastException}. At creation time the types in {@code m} are * not checked for correct type. * * @param m * the map to be wrapped in a typesafe map. * @param keyType * the type of the keys permitted to insert. * @param valueType * the type of the values permitted to insert. * @return a typesafe map. */ public static <K, V> Map<K, V> checkedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType) { return new CheckedMap<K, V>(m, keyType, valueType); }
/** * Returns a dynamically typesafe view of the specified map. Trying to * insert an element of the wrong type into this map throws a * {@code ClassCastException}. At creation time the types in {@code m} are * not checked for correct type. * * @param m * the map to be wrapped in a typesafe map. * @param keyType * the type of the keys permitted to insert. * @param valueType * the type of the values permitted to insert. * @return a typesafe map. */ public static <K, V> Map<K, V> checkedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType) { return new CheckedMap<K, V>(m, keyType, valueType); }
/** * Returns a dynamically typesafe view of the specified map. Trying to * insert an element of the wrong type into this map throws a * {@code ClassCastException}. At creation time the types in {@code m} are * not checked for correct type. * * @param m * the map to be wrapped in a typesafe map. * @param keyType * the type of the keys permitted to insert. * @param valueType * the type of the values permitted to insert. * @return a typesafe map. */ public static <K, V> Map<K, V> checkedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType) { return new CheckedMap<K, V>(m, keyType, valueType); }
/** * Returns a dynamically typesafe view of the specified map. Trying to * insert an element of the wrong type into this map throws a * {@code ClassCastException}. At creation time the types in {@code m} are * not checked for correct type. * * @param m * the map to be wrapped in a typesafe map. * @param keyType * the type of the keys permitted to insert. * @param valueType * the type of the values permitted to insert. * @return a typesafe map. */ public static <K, V> Map<K, V> checkedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType) { return new CheckedMap<K, V>(m, keyType, valueType); }
/** * Returns a dynamically typesafe view of the specified map. Trying to * insert an element of the wrong type into this map throws a * {@code ClassCastException}. At creation time the types in {@code m} are * not checked for correct type. * * @param m * the map to be wrapped in a typesafe map. * @param keyType * the type of the keys permitted to insert. * @param valueType * the type of the values permitted to insert. * @return a typesafe map. */ public static <K, V> Map<K, V> checkedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType) { return new CheckedMap<K, V>(m, keyType, valueType); }
/** * Returns a dynamically typesafe view of the specified map. Trying to * insert an element of the wrong type into this map throws a * {@code ClassCastException}. At creation time the types in {@code m} are * not checked for correct type. * * @param m * the map to be wrapped in a typesafe map. * @param keyType * the type of the keys permitted to insert. * @param valueType * the type of the values permitted to insert. * @return a typesafe map. */ public static <K, V> Map<K, V> checkedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType) { return new CheckedMap<K, V>(m, keyType, valueType); }