equal
deleted
inserted
replaced
702 |
702 |
703 startIndex := index := self initialIndexForKey:key. |
703 startIndex := index := self initialIndexForKey:key. |
704 |
704 |
705 [true] whileTrue:[ |
705 [true] whileTrue:[ |
706 probe := (keyArray basicAt:index). |
706 probe := (keyArray basicAt:index). |
707 (probe notNil and:[key = probe]) ifTrue:[^ index]. |
707 (probe notNil and:[probe ~~ DeletedEntry and:[key = probe]]) ifTrue:[^ index]. |
708 (self slotIsEmpty:probe) ifTrue:[^ aBlock value]. |
708 (self slotIsEmpty:probe) ifTrue:[^ aBlock value]. |
709 |
709 |
710 index == length ifTrue:[ |
710 index == length ifTrue:[ |
711 index := 1 |
711 index := 1 |
712 ] ifFalse:[ |
712 ] ifFalse:[ |
713 index := index + 1 |
713 index := index + 1 |
714 ]. |
714 ]. |
715 index == startIndex ifTrue:[^ aBlock value]. |
715 index == startIndex ifTrue:[^ aBlock value]. |
716 ] |
716 ] |
|
717 |
|
718 "Modified: / 03-02-2011 / 13:53:18 / sr" |
717 ! |
719 ! |
718 |
720 |
719 findKeyOrNil:key |
721 findKeyOrNil:key |
720 "Look for the key in the receiver. |
722 "Look for the key in the receiver. |
721 If it is found, return the index of the first unused slot. |
723 If it is found, return the index of the first unused slot. |
1172 ! ! |
1174 ! ! |
1173 |
1175 |
1174 !Set class methodsFor:'documentation'! |
1176 !Set class methodsFor:'documentation'! |
1175 |
1177 |
1176 version |
1178 version |
1177 ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.106 2010-07-23 19:40:09 stefan Exp $' |
1179 ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.107 2011-02-03 12:53:34 sr Exp $' |
1178 ! |
1180 ! |
1179 |
1181 |
1180 version_CVS |
1182 version_CVS |
1181 ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.106 2010-07-23 19:40:09 stefan Exp $' |
1183 ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.107 2011-02-03 12:53:34 sr Exp $' |
1182 ! ! |
1184 ! ! |
1183 |
1185 |
1184 Set initialize! |
1186 Set initialize! |