クラス名・変数名に迷ったら書き込むスレ。Part5
http://pc8.2ch.net/test/read.cgi/tech/1109330204/606 ◇- has> →HashMap
設置場所クラス<名前適当
◇- 1 Aggregation 0..* →InstallationAdapter◇- 1 Aggregation 1→Machine
固有ID(配置番号)はHashMapのキーがそのまま使えませんか?
固有ID特有の条件(追加不可等)は設置場所クラスで実装。
導入日等が不変であるなら(コンストラクタ)InstallationAdapter(Date, Machine)
等としてImmutable化。
こんな感じだとどうでしょう?