cast<RK,RV> abstract method
Provides a view of this map as havingRK keys andRV instances,if necessary.
If this map is already aMap<RK, RV>, it is returned unchanged.
If this set contains only keys of typeRK and values of typeRV,all read operations will work correctly.If any operation exposes a non-RK key or non-RV value,the operation will throw instead.
Entries added to the map must be valid for both aMap<K, V> and aMap<RK, RV>.
Methods which acceptObject? as argument,likecontainsKey,remove andoperator [],will pass the argument directly to the this map's methodwithout any checks.That means that you can domapWithStringKeys.cast<int,int>().remove("a")successfully, even if it looks like it shouldn't have any effect.
Implementation
Map<RK, RV> cast<RK, RV>();