It would be even more object oriented if you replaced the last bits of the if statement with a Map connecting EventTypes to EventHandler factory objects.
要想進一步增強物件導向特*,可以將if語句的最後一小部分替換為Map,後者將EventType連線到EventHandler工廠物件。
It would be even more object oriented if you replaced the last bits of the if statement with a Map connecting EventTypes to EventHandler factory objects.
要想進一步增強物件導向特*,可以將if語句的最後一小部分替換為Map,後者將EventType連線到EventHandler工廠物件。