キー値とvalue値のセットでデータを格納できるのがMapですが、下記のメソッドが便利そうなのでメモ。

Mapにデータがあるかないかを判定

Map<String, String> colorCodes = new Map<String, String>();
Boolean empty = colorCodes.isEmpty();
system.assertEquals( empty, true );

キー値のセットを取得

Map<String, String> colorCodes = new Map<String, String>();

colorCodes.put('Red', 'FF0000');
colorCodes.put('Blue', '0000A0');

Set <String> colorSet = new Set<String>();
colorSet = colorCodes.keySet();