Then what is good? Does it make sense to wrap dictionary and use keys for the part that I use for equality? Because I need to have instances of a class to appear only once, but I want to be able to override instance when I add a new one. Uko
On 09 Feb 2015, at 17:22, Max Leske <maxleske@gmail.com> wrote:
On 09 Feb 2015, at 17:08, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Hi, Iâm looking for a way to add an element to a Set and override the existing one if it is already in the set. I found #noCheckAdd: method, but a comment says that it should be deprecated. Is there any other solution I should follow?
Why would you want to do that? If you need to replace the object then they are obviously not equal and a set may be the wrong data structure...
Uko