Perhaps Set and Map should be interfaces. Different implementations could be optimised for specific use cases (e.g., IntSet) and even have their own specific methods, but all usable via the common interfaces. It should thus be possible to union a Set and an IntSet.
Perhaps Set and Map should be interfaces. Different implementations could be optimised for specific use cases (e.g.,
IntSet
) and even have their own specific methods, but all usable via the common interfaces. It should thus be possible to union a Set and an IntSet.