0]]>
a value]]]>
= y].
contents associationsDo:
[:assn |
counts add: (Association key: assn value value: assn key)].
^counts]]>
self size ifTrue: [^self].
anInteger = self size ifTrue: [^aBlock value: self].
anInteger to: self size do:
[:i | self swap: anInteger with: i.
self permutationsStartingAt: anInteger + 1 do: aBlock.
self swap: anInteger with: i]]]>
26 "first method faster from 27 accesses and on"
ifTrue: [self from: 1 to: size put: anObject]
ifFalse: [1 to: size do: [:index | self at: index put: anObject]]]]>
0 ifTrue: [labelStream skip: -1].
^ labelStream contents]]>
0]
whileTrue:
[endIndex _ currentIndex + oldSubstring size - 1.
(ifTokens not
or: [(currentIndex = 1
or: [(aString at: currentIndex-1) isAlphaNumeric not])
and: [endIndex = aString size
or: [(aString at: endIndex+1) isAlphaNumeric not]]])
ifTrue: [aString _ aString
copyReplaceFrom: currentIndex
to: endIndex
with: newSubstring.
startSearch _ currentIndex + newSubstring size]
ifFalse: [
ifTokens
ifTrue: [startSearch _ currentIndex + 1]
ifFalse: [startSearch _ currentIndex + newSubstring size]]].
^ aString
"Test case:
'test te string' copyReplaceAll: 'te' with: 'longone' asTokens: true "
]]>
b] sorts in descending
order)."
^ (self asSortedCollection: aBlock) asOrderedCollection]]>
self size ifTrue: [self error: 'not enough elements'].
^ self at: index]]>
= 1] whileTrue:
[(aBlock value: (self at: index)) ifTrue: [^index]].
^ 0]]>
self size ifTrue: [^ self last].
^ self at: index]]>
0 ifTrue: [ ^ index ].
"Bad scene. Neither have we found a matching element
nor even an empty slot. No hashed set is ever supposed to get
completely full."
self error: 'There is no free space in this set!'.]]>