logo       

reimplementing #= and #hash: msg#00120

lang.smalltalk.squeak.beginners

Subject: reimplementing #= and #hash

Hi List,

I have a Class PoolQueue which has instvars 'member' and 'processor'. I find that an instance of PoolQueue when placed in an OrderedCollection can no longer be considered equal. I suppose I have to reimplement #= and #hash to allow PoolQueue instances to be compared.

My problem: how do I implement #hash? Or stated another way, what does #hash accomplish?

Thanks in advance.

Ching.
_______________________________________________
Beginners mailing list
Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/mailman/listinfo/beginners
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise