I want to write a class diagram for a class that contains a hashmap. Normally, I would do this:

But my Map looks like this:
private Map<Beacon, String> beaconRoute;
The key is a custom class.
How can I describe it in an UML diagram?
I want to write a class diagram for a class that contains a hashmap. Normally, I would do this:

But my Map looks like this:
private Map<Beacon, String> beaconRoute;
The key is a custom class.
How can I describe it in an UML diagram?
Use
beacon : Beaconinside the qualifier rectangle and use theStringdata type as the target type (instead ofEmployee). The propertybeaconRouteis the association end name. You don't have to be so literal as to have a Map class in UML--doing that loses sight of the problem domain. Not that I understand why aBeaconwould map to aString, though. Did you reverse the key and value by mistake?