Use EnumMap instead of HashMap.