From Map, the removal of elements is done by using remove (Object key) method. This would be removing pair (Key, Value) from Map.
Any type of elements could be put into Map. Type of objects can be limited to be used for values or keys in a Map. How to limit values or keys is well explained in the given code.
Map just accepts the value son MyObject type or keys of string type,
Java Code: This is the code to limit values or keys
Map<String, MyObject> map = new HashSet<String, MyObject>();