You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If more commodities are specified, the CommoditySet class has to be extendend for each commodity added. If you don't know about this class, things may go wrong. Therefore this class is not really generic.
This is not future proof, preferably the iterator returns the commodity itself, instead of the booleans
The text was updated successfully, but these errors were encountered:
The CommoditySet is really a Set, in the sense that you can ask it for which Commodity objects are in it. Since there are only 3 possible Commodities right now (it is an enumeration, somewhat), it seemed simpler to implement it with 3 boolean value. On the outside it acts perfectly according to the Set interface.
But the EFI classes really want to see a CommoditySet, not a Set containing commodies. I think the proper way would be to demand a Set<Commodity> in the EFI classes, and in practice always use the CommoditySet since it is more efficient.
For each commodity a boolean is used.
If more commodities are specified, the CommoditySet class has to be extendend for each commodity added. If you don't know about this class, things may go wrong. Therefore this class is not really generic.
This is not future proof, preferably the iterator returns the commodity itself, instead of the booleans
The text was updated successfully, but these errors were encountered: