By using the qualified association element of UML Class Diagram, we can create HashMap as the datatype of one of our class attributes (see here). In my case, I have to use HashMap with different key datatype (String and int) if the audience would be only with Java developers I would provide UML Class diagram as below:
and I guess this is just fine. However, my audience is unknown so I'm trying to provide a UML Class Diagram as general as I can. For example, the HashMap can be Dictionary in another programming language.