equal
deleted
inserted
replaced
7 inclusion of the above copyright notice. This software may not |
7 inclusion of the above copyright notice. This software may not |
8 be provided or otherwise made available to, or used by, any |
8 be provided or otherwise made available to, or used by, any |
9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 |
|
13 "{ Package: 'stx:libbasic' }" |
12 "{ Package: 'stx:libbasic' }" |
14 |
13 |
15 ArrayedCollection variableSubclass:#WeakArray |
14 ArrayedCollection variableSubclass:#WeakArray |
16 instanceVariableNames:'dependents' |
15 instanceVariableNames:'dependents' |
17 classVariableNames:'RegistrationFailedSignal AlreadyInitialized' |
16 classVariableNames:'RegistrationFailedSignal AlreadyInitialized' |
254 (You dont have to understand this.)" |
253 (You dont have to understand this.)" |
255 |
254 |
256 ^ self basicAt:index |
255 ^ self basicAt:index |
257 |
256 |
258 "Modified: 25.1.1997 / 13:41:25 / cg" |
257 "Modified: 25.1.1997 / 13:41:25 / cg" |
|
258 ! |
|
259 |
|
260 at:index ifInvalid:exeptionalValue |
|
261 "return the indexed instance variable with index, anInteger, |
|
262 but only if still valid; otherwise return the value from exceptionalValue" |
|
263 |
|
264 |el| |
|
265 |
|
266 el := self basicAt:index. |
|
267 el == 0 ifTrue:[ |
|
268 ^ exeptionalValue value |
|
269 ]. |
|
270 ^ el |
259 ! |
271 ! |
260 |
272 |
261 at:index put:someObject |
273 at:index put:someObject |
262 "store someObject in the weakArray at some index." |
274 "store someObject in the weakArray at some index." |
263 |
275 |
1006 ! ! |
1018 ! ! |
1007 |
1019 |
1008 !WeakArray class methodsFor:'documentation'! |
1020 !WeakArray class methodsFor:'documentation'! |
1009 |
1021 |
1010 version |
1022 version |
1011 ^ '$Header: /cvs/stx/stx/libbasic/WeakArray.st,v 1.65 2010-07-22 10:57:42 cg Exp $' |
1023 ^ '$Header: /cvs/stx/stx/libbasic/WeakArray.st,v 1.66 2010-08-11 14:11:08 sr Exp $' |
|
1024 ! |
|
1025 |
|
1026 version_CVS |
|
1027 ^ '$Header: /cvs/stx/stx/libbasic/WeakArray.st,v 1.66 2010-08-11 14:11:08 sr Exp $' |
1012 ! ! |
1028 ! ! |
1013 |
1029 |
1014 WeakArray initialize! |
1030 WeakArray initialize! |