author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 04 Sep 2013 09:43:51 +0100 | |
branch | jv |
changeset 18093 | 2b786a9af1d0 |
parent 18091 | abbcac10730e |
parent 15732 | e57fb13f5af2 |
child 18120 | e3a375d5f6a8 |
permissions | -rw-r--r-- |
1 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1991 by Claus Gittinger |
345 | 3 |
All Rights Reserved |
1 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
5375 | 12 |
"{ Package: 'stx:libbasic' }" |
13 |
||
1 | 14 |
Collection subclass:#Bag |
1057 | 15 |
instanceVariableNames:'contents' |
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'Collections-Unordered' |
|
1 | 19 |
! |
20 |
||
54 | 21 |
!Bag class methodsFor:'documentation'! |
22 |
||
88 | 23 |
copyright |
24 |
" |
|
25 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
345 | 26 |
All Rights Reserved |
88 | 27 |
|
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
54 | 37 |
documentation |
38 |
" |
|
88 | 39 |
Bag implements collections whose elements are unordered and have no |
154 | 40 |
external key. Elements may occur more than once in a bag. There is no defined |
8873 | 41 |
order within a bag. |
42 |
The default implementation uses a dictionary to store each objects occurrence |
|
43 |
count, using the object itself as key (i.e. using = and hash for inclusion |
|
345 | 44 |
tests). |
399 | 45 |
|
345 | 46 |
There is also an instance creation variant (#identityNew:) creating a |
47 |
bag which compares using #== and hashes using #identityHash. |
|
8873 | 48 |
(I'd say that an IdentityBag was a better thing to implement ... |
399 | 49 |
... but for compatibility ... we do it here as well) |
1 | 50 |
|
1283 | 51 |
[Instance variables:] |
52 |
||
8873 | 53 |
contents <Dictionary> for each element, the number of occurrences |
1283 | 54 |
|
1 | 55 |
|
1290 | 56 |
[author:] |
8873 | 57 |
Claus Gittinger |
1290 | 58 |
|
1283 | 59 |
[See also:] |
8873 | 60 |
Set IdentitySet |
61 |
Dictionary IdentityDictionary |
|
62 |
OrderedCollection Array |
|
54 | 63 |
" |
64 |
! ! |
|
1 | 65 |
|
66 |
!Bag class methodsFor:'instance creation'! |
|
67 |
||
14956 | 68 |
contentsClass |
69 |
"the default class to use for the underlying contents array, |
|
70 |
used when instantiated with new/new:" |
|
71 |
||
72 |
^ Dictionary |
|
73 |
! |
|
74 |
||
75 |
equalityNew |
|
76 |
"return a new empty Bag. |
|
77 |
Elements will be compared using equality compare (i.e. #= not #== identity)." |
|
78 |
||
79 |
^ self basicNew initContentsForEquality |
|
80 |
! |
|
81 |
||
345 | 82 |
equalityNew:size |
83 |
"return a new empty Bag with initial space for size elements. |
|
84 |
Elements will be compared using equality compare (i.e. #= not #== identity)." |
|
1 | 85 |
|
14956 | 86 |
^ self basicNew initContentsForEquality:size |
345 | 87 |
! |
88 |
||
5375 | 89 |
identityNew |
14956 | 90 |
"return a new empty Identity-Bag. |
5375 | 91 |
Elements will be compared using identity compare (i.e. #== not #= equality)." |
92 |
||
14956 | 93 |
^ self basicNew initContentsForIdentity |
5375 | 94 |
! |
95 |
||
345 | 96 |
identityNew:size |
97 |
"return a new empty Bag with initial space for size elements. |
|
98 |
Elements will be compared using identity compare (i.e. #== not #= equality)." |
|
99 |
||
5558 | 100 |
^ self basicNew initContentsForIdentity:size |
1 | 101 |
! |
102 |
||
609 | 103 |
new |
104 |
"return a new empty Bag which compares for equality (i.e. not identity)" |
|
1 | 105 |
|
5558 | 106 |
^ self basicNew initContents |
345 | 107 |
! |
108 |
||
609 | 109 |
new:size |
110 |
"return a new empty Bag with initial space for size elements. |
|
111 |
Elements will be compared using equality compare (i.e. #= not #== identity)." |
|
345 | 112 |
|
609 | 113 |
^ self equalityNew:size |
1 | 114 |
! ! |
115 |
||
7261 | 116 |
!Bag methodsFor:'Compatibility-Dolphin'! |
6411 | 117 |
|
118 |
asAssociations |
|
11935 | 119 |
"return the dictionary which associates occurrence-counts |
120 |
to the bags elements. |
|
121 |
Same as #contents for dolphin compatibility." |
|
122 |
||
14685 | 123 |
^ self contents |
6411 | 124 |
! ! |
125 |
||
1 | 126 |
!Bag methodsFor:'accessing'! |
127 |
||
128 |
at:index |
|
129 |
"report an error: at: is not allowed for Bags" |
|
130 |
||
131 |
^ self errorNotKeyed |
|
132 |
! |
|
133 |
||
134 |
at:index put:anObject |
|
135 |
"report an error: at:put: is not allowed for Bags" |
|
136 |
||
137 |
^ self errorNotKeyed |
|
345 | 138 |
! |
139 |
||
140 |
contents |
|
141 |
"return the dictionary which associates occurrence-counts |
|
142 |
to the bags elements." |
|
143 |
||
144 |
^ contents |
|
15732 | 145 |
|
146 |
" |
|
147 |
Bag new |
|
148 |
add:'abc'; |
|
149 |
add:'def'; |
|
150 |
add:'ghi'; |
|
151 |
add:'abc'; |
|
152 |
add:'def'; |
|
153 |
add:'abc'; |
|
154 |
add:'abc'; |
|
155 |
contents |
|
156 |
" |
|
15686 | 157 |
! |
158 |
||
159 |
sortedCounts |
|
15732 | 160 |
"Answer with a collection of counts associated to elements, sorted by decreasing count." |
15686 | 161 |
"Suggested by l. Uzonyi" |
162 |
||
163 |
^ (Array new:contents size |
|
164 |
streamContents:[:stream | |
|
165 |
contents associationsDo:[:each | stream nextPut:each value -> each key ] |
|
166 |
]) |
|
167 |
sort:[:x :y | x >= y ]; |
|
168 |
yourself |
|
15731 | 169 |
|
170 |
" |
|
171 |
Bag new |
|
172 |
add:'abc'; |
|
173 |
add:'def'; |
|
174 |
add:'ghi'; |
|
175 |
add:'abc'; |
|
176 |
add:'def'; |
|
177 |
add:'abc'; |
|
178 |
add:'abc'; |
|
179 |
sortedCounts |
|
180 |
" |
|
1 | 181 |
! ! |
182 |
||
183 |
!Bag methodsFor:'adding & removing'! |
|
184 |
||
54 | 185 |
add:newObject |
345 | 186 |
"add the argument, anObject to the receiver. |
14896 | 187 |
Returns the object (sigh). |
1057 | 188 |
|
189 |
WARNING: do not add/remove elements while iterating over the receiver. |
|
14896 | 190 |
Iterate over a copy to do this." |
1 | 191 |
|
54 | 192 |
|n| |
193 |
||
1145
a094d90e11bf
dont use [0] blocks - use 0 constant instead
Claus Gittinger <cg@exept.de>
parents:
1110
diff
changeset
|
194 |
n := contents at:newObject ifAbsent:0. |
54 | 195 |
contents at:newObject put:(n + 1). |
196 |
^ newObject |
|
1057 | 197 |
|
198 |
"Modified: 1.3.1996 / 21:43:06 / cg" |
|
1 | 199 |
! |
200 |
||
1372
d7bd1b463a65
oops - typo; occurrences has two r's
Claus Gittinger <cg@exept.de>
parents:
1290
diff
changeset
|
201 |
add:newObject withOccurrences:anInteger |
345 | 202 |
"add the argument, anObject anInteger times to the receiver. |
1057 | 203 |
Returns the object. |
204 |
||
205 |
WARNING: do not add/remove elements while iterating over the receiver. |
|
8873 | 206 |
Iterate over a copy to do this." |
1 | 207 |
|
54 | 208 |
|n| |
209 |
||
1145
a094d90e11bf
dont use [0] blocks - use 0 constant instead
Claus Gittinger <cg@exept.de>
parents:
1110
diff
changeset
|
210 |
n := contents at:newObject ifAbsent:0. |
54 | 211 |
contents at:newObject put:(n + anInteger). |
1 | 212 |
^ newObject |
1057 | 213 |
|
214 |
"Modified: 1.3.1996 / 21:43:12 / cg" |
|
1372
d7bd1b463a65
oops - typo; occurrences has two r's
Claus Gittinger <cg@exept.de>
parents:
1290
diff
changeset
|
215 |
"Created: 11.5.1996 / 12:13:43 / cg" |
1 | 216 |
! |
217 |
||
218 |
remove:oldObject ifAbsent:anExceptionBlock |
|
345 | 219 |
"Remove oldObject from the collection. |
220 |
If it was not present, return the value of the exceptionBlock; |
|
1057 | 221 |
otherwise return the removed object. |
222 |
||
223 |
WARNING: do not add/remove elements while iterating over the receiver. |
|
8873 | 224 |
Iterate over a copy to do this." |
1 | 225 |
|
226 |
|count| |
|
227 |
||
1145
a094d90e11bf
dont use [0] blocks - use 0 constant instead
Claus Gittinger <cg@exept.de>
parents:
1110
diff
changeset
|
228 |
count := contents at:oldObject ifAbsent:0. |
1 | 229 |
(count == 0) ifTrue:[^ anExceptionBlock value]. |
230 |
(count == 1) ifTrue:[ |
|
8873 | 231 |
contents removeKey:oldObject |
232 |
] ifFalse:[ |
|
233 |
contents at:oldObject put:(count - 1) |
|
1 | 234 |
]. |
235 |
^ oldObject |
|
1057 | 236 |
|
237 |
"Modified: 1.3.1996 / 21:43:18 / cg" |
|
345 | 238 |
! |
239 |
||
1110 | 240 |
removeAll |
1164 | 241 |
"remove all objects from the receiver collection (i.e. make it empty). |
242 |
Returns the receiver." |
|
1110 | 243 |
|
244 |
contents := contents species new. |
|
245 |
||
246 |
" |
|
247 |
|b| |
|
248 |
||
249 |
b := Bag new. |
|
250 |
b add:1; add:2; add:3; add:2; add:1. |
|
1422 | 251 |
Transcript showCR:b. |
1110 | 252 |
|
253 |
b removeAll. |
|
254 |
||
1422 | 255 |
Transcript showCR:b |
1110 | 256 |
" |
257 |
||
1164 | 258 |
"Modified: 12.4.1996 / 13:34:34 / cg" |
1110 | 259 |
! |
260 |
||
345 | 261 |
removeAllOccurrencesOf:oldObject ifAbsent:anExceptionBlock |
262 |
"Remove all occurrences of oldObject from the collection. |
|
263 |
If it was not present, return the value of the exceptionBlock; |
|
1057 | 264 |
otherwise return the number of removes. |
265 |
||
266 |
WARNING: do not add/remove elements while iterating over the receiver. |
|
8873 | 267 |
Iterate over a copy to do this." |
345 | 268 |
|
269 |
|count| |
|
270 |
||
1145
a094d90e11bf
dont use [0] blocks - use 0 constant instead
Claus Gittinger <cg@exept.de>
parents:
1110
diff
changeset
|
271 |
count := contents at:oldObject ifAbsent:0. |
345 | 272 |
(count == 0) ifTrue:[^ anExceptionBlock value]. |
273 |
contents removeKey:oldObject. |
|
274 |
^ oldObject |
|
1057 | 275 |
|
276 |
"Modified: 1.3.1996 / 21:43:26 / cg" |
|
1 | 277 |
! ! |
278 |
||
8860 | 279 |
!Bag methodsFor:'bulk operations'! |
280 |
||
281 |
sum |
|
11522 | 282 |
"sum up all elements; return 0 for an empty collection. |
283 |
can be done easier, using bags knowledge." |
|
8860 | 284 |
|
285 |
|accu| |
|
286 |
||
11522 | 287 |
self isEmpty ifTrue:[ ^ 0 ]. |
11474 | 288 |
|
289 |
accu := nil. |
|
290 |
self |
|
291 |
valuesAndCountsDo:[:n :count | |
|
292 |
|thisAmount| |
|
293 |
||
294 |
thisAmount := count * n. |
|
295 |
accu := (accu isNil ifTrue:[thisAmount] ifFalse:[accu + thisAmount]) ]. |
|
8860 | 296 |
^ accu |
297 |
||
298 |
" |
|
11474 | 299 |
TestCase assert:((Bag new add:1; add:2; add:3; add:1; add:2; add:1; yourself) sum = 10). |
8860 | 300 |
" |
301 |
! ! |
|
302 |
||
6735
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
303 |
!Bag methodsFor:'comparing'! |
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
304 |
|
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
305 |
= aBag |
11935 | 306 |
"Compare the receiver with the argument and return true if the |
307 |
receiver is equal to the argument (i.e. has the same size and elements). |
|
308 |
Otherwise return false." |
|
309 |
||
6735
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
310 |
aBag species == self species ifFalse:[^ false]. |
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
311 |
self size == aBag size ifFalse:[^ false]. |
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
312 |
self valuesAndCountsDo:[:val :cnt | |
11935 | 313 |
(aBag occurrencesOf:val) == cnt ifFalse:[^ false] |
6735
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
314 |
]. |
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
315 |
^ true |
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
316 |
! |
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
317 |
|
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
318 |
hash |
11935 | 319 |
"return an integer useful for hashing on the receiver; |
320 |
redefined since = is redefined here." |
|
321 |
||
6735
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
322 |
|h| |
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
323 |
|
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
324 |
h := self size. |
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
325 |
self valuesAndCountsDo:[:val :cnt | |
11935 | 326 |
h := h + cnt hash. |
6735
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
327 |
]. |
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
328 |
^ h |
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
329 |
! ! |
fad09454a025
added #= and #hash (to put bags into Sets/Dictionaries)
Claus Gittinger <cg@exept.de>
parents:
6411
diff
changeset
|
330 |
|
609 | 331 |
!Bag methodsFor:'converting'! |
332 |
||
333 |
asBag |
|
334 |
"return the receiver as a bag" |
|
335 |
||
336 |
"could be an instance of a subclass..." |
|
337 |
self class == Bag ifTrue:[ |
|
338 |
^ self |
|
339 |
]. |
|
340 |
^ super asBag |
|
7161 | 341 |
! |
342 |
||
343 |
asSet |
|
344 |
"return the receiver as a set" |
|
345 |
||
346 |
^ contents keys copy |
|
347 |
||
348 |
" |
|
349 |
|b| |
|
350 |
||
351 |
b := Bag new. |
|
352 |
b add:1; add:2; add:3; add:1; add:1. |
|
353 |
b asSet. |
|
354 |
" |
|
609 | 355 |
! ! |
356 |
||
357 |
!Bag methodsFor:'copying'! |
|
358 |
||
359 |
postCopy |
|
360 |
"must copy the contents as well" |
|
361 |
||
362 |
contents := contents copy |
|
363 |
! ! |
|
364 |
||
1 | 365 |
!Bag methodsFor:'enumerating'! |
366 |
||
367 |
do:aBlock |
|
1057 | 368 |
"evaluate the block for all elements in the collection. |
369 |
||
370 |
WARNING: do not add/remove elements while iterating over the receiver. |
|
8873 | 371 |
Iterate over a copy to do this." |
1 | 372 |
|
54 | 373 |
contents keysAndValuesDo:[:key :value| |
8873 | 374 |
value timesRepeat:[ |
375 |
aBlock value:key |
|
376 |
] |
|
1 | 377 |
] |
1057 | 378 |
|
379 |
"Modified: 1.3.1996 / 21:42:39 / cg" |
|
345 | 380 |
! |
381 |
||
10835 | 382 |
valuesAndCounts |
11481 | 383 |
"return an orderedCollection containing value->count associations" |
10835 | 384 |
|
385 |
|coll| |
|
386 |
||
387 |
coll := OrderedCollection new. |
|
388 |
self valuesAndCountsDo:[:value :count | coll add:(value->count)]. |
|
389 |
^ coll |
|
390 |
||
391 |
"Modified: 1.3.1996 / 21:42:44 / cg" |
|
392 |
! |
|
393 |
||
345 | 394 |
valuesAndCountsDo:aTwoArgBlock |
395 |
"evaluate the block for all distinct elements in the collection, |
|
8873 | 396 |
passing both the element and the occurrence count as arguments. |
1057 | 397 |
|
398 |
WARNING: do not add/remove elements while iterating over the receiver. |
|
8873 | 399 |
Iterate over a copy to do this." |
345 | 400 |
|
401 |
^ contents keysAndValuesDo:aTwoArgBlock |
|
1057 | 402 |
|
403 |
"Modified: 1.3.1996 / 21:42:44 / cg" |
|
1 | 404 |
! ! |
609 | 405 |
|
12823 | 406 |
!Bag methodsFor:'printing & storing'! |
407 |
||
408 |
printElementsDo:aBlock |
|
14685 | 409 |
self valuesAndCountsDo:[:value :count| |
410 |
aBlock value:('%1(*%2)' bindWith:value with:count). |
|
12823 | 411 |
] |
412 |
! ! |
|
413 |
||
609 | 414 |
!Bag methodsFor:'private'! |
415 |
||
416 |
initContents |
|
14956 | 417 |
"set the contents to be an empty Dictionary. |
418 |
This is the default method for initialization, which can be redefined in subclasses." |
|
419 |
||
420 |
contents := self class contentsClass new |
|
421 |
! |
|
422 |
||
423 |
initContents:size |
|
424 |
"set the contents to be an empty Dictionary with initial size. |
|
425 |
This is the default method for initialization, which can be redefined in subclasses." |
|
426 |
||
427 |
contents := self class contentsClass new: size |
|
428 |
! |
|
429 |
||
430 |
initContentsForEquality |
|
609 | 431 |
"set the contents to be an empty Dictionary" |
432 |
||
433 |
contents := Dictionary new |
|
434 |
! |
|
435 |
||
14956 | 436 |
initContentsForEquality:size |
609 | 437 |
"set the contents to be an empty Dictionary with initial size" |
438 |
||
439 |
contents := Dictionary new:size |
|
440 |
! |
|
441 |
||
5375 | 442 |
initContentsForIdentity |
443 |
"set the contents to be an empty IdentityDictionary" |
|
444 |
||
445 |
contents := IdentityDictionary new |
|
446 |
! |
|
447 |
||
609 | 448 |
initContentsForIdentity:size |
449 |
"set the contents to be an empty IdentityDictionary with initial size" |
|
450 |
||
451 |
contents := IdentityDictionary new:size |
|
452 |
! ! |
|
453 |
||
5557 | 454 |
!Bag methodsFor:'queries'! |
455 |
||
456 |
size |
|
457 |
"return the number of bag elements" |
|
458 |
||
459 |
|count| |
|
460 |
||
461 |
count := 0. |
|
462 |
contents do:[:element | count := count + element]. |
|
463 |
^ count |
|
464 |
! ! |
|
465 |
||
15457 | 466 |
!Bag methodsFor:'statistical functions'! |
467 |
||
468 |
variance |
|
469 |
"compute the variance over a complete data set (and not of a sample)" |
|
470 |
||
471 |
|m sz sumDeltaSquares| |
|
472 |
||
473 |
m := self arithmeticMean. |
|
474 |
sumDeltaSquares := 0. |
|
475 |
sz := 0. |
|
476 |
self |
|
477 |
valuesAndCountsDo:[:val :count | |
|
478 |
sumDeltaSquares := sumDeltaSquares + ((val - m) squared). |
|
479 |
sz := sz + 1. |
|
480 |
]. |
|
481 |
||
482 |
^ sumDeltaSquares / sz |
|
483 |
||
484 |
" |
|
485 |
TestCase assert:( #(1 1 1 2 2 2 1 1 1 2 2 2) asBag variance = #(1 1 1 2 2 2 1 1 1 2 2 2) variance). |
|
486 |
TestCase assert:( #(1 1 1 1 1 0 0 0 0 0) asBag variance = #(1 1 1 1 1 0 0 0 0 0) variance). |
|
487 |
" |
|
488 |
! ! |
|
489 |
||
609 | 490 |
!Bag methodsFor:'testing'! |
491 |
||
492 |
includes:anObject |
|
493 |
"return true, if anObject is in the receiver" |
|
494 |
||
14685 | 495 |
^ (self occurrencesOf:anObject) > 0 |
609 | 496 |
! |
497 |
||
15429 | 498 |
isFixedSize |
499 |
"return true if the receiver cannot grow" |
|
500 |
||
501 |
^ false |
|
502 |
! |
|
503 |
||
609 | 504 |
occurrencesOf:anObject |
505 |
"return how many times anObject is in the receiver" |
|
506 |
||
1145
a094d90e11bf
dont use [0] blocks - use 0 constant instead
Claus Gittinger <cg@exept.de>
parents:
1110
diff
changeset
|
507 |
^ contents at:anObject ifAbsent:0 |
609 | 508 |
! ! |
509 |
||
633 | 510 |
!Bag class methodsFor:'documentation'! |
511 |
||
512 |
version |
|
15732 | 513 |
^ '$Header: /cvs/stx/stx/libbasic/Bag.st,v 1.49 2013-08-31 13:17:33 cg Exp $' |
12823 | 514 |
! |
515 |
||
516 |
version_CVS |
|
15732 | 517 |
^ '$Header: /cvs/stx/stx/libbasic/Bag.st,v 1.49 2013-08-31 13:17:33 cg Exp $' |
633 | 518 |
! ! |
14685 | 519 |