Set.st
changeset 17410 9c4592a7b540
parent 17263 65d015f98f43
child 17413 8048855efc47
equal deleted inserted replaced
17409:987cd6ce6d2e 17410:9c4592a7b540
   198     "
   198     "
   199 
   199 
   200     "Created: / 24.10.1997 / 23:13:44 / cg"
   200     "Created: / 24.10.1997 / 23:13:44 / cg"
   201 ! !
   201 ! !
   202 
   202 
       
   203 
   203 !Set methodsFor:'Compatibility-ST80'!
   204 !Set methodsFor:'Compatibility-ST80'!
   204 
   205 
   205 initialIndexFor:hashKey boundedBy:length
   206 initialIndexFor:hashKey boundedBy:length
   206     "for ST-80 compatibility only; it is (currently) not used in this
   207     "for ST-80 compatibility only; it is (currently) not used in this
   207      implementation of sets. Therefore, in ST/X it does not make sense
   208      implementation of sets. Therefore, in ST/X it does not make sense
   367         self possiblyGrow.
   368         self possiblyGrow.
   368     ].
   369     ].
   369     ^ keyArg
   370     ^ keyArg
   370 
   371 
   371     "Modified: 30.1.1997 / 14:58:08 / cg"
   372     "Modified: 30.1.1997 / 14:58:08 / cg"
       
   373 !
       
   374 
       
   375 clearContents
       
   376     "remove all elements from the receiver, but do not resize.
       
   377      Returns the receiver."
       
   378 
       
   379     keyArray atAllPut:nil.
   372 !
   380 !
   373 
   381 
   374 remove:oldObjectArg ifAbsent:exceptionBlock
   382 remove:oldObjectArg ifAbsent:exceptionBlock
   375     "remove oldObject from the collection and return it.
   383     "remove oldObject from the collection and return it.
   376      If it was not in the collection return the value of exceptionBlock.
   384      If it was not in the collection return the value of exceptionBlock.
  1230     "return the number of set elements"
  1238     "return the number of set elements"
  1231 
  1239 
  1232     ^ tally
  1240     ^ tally
  1233 ! !
  1241 ! !
  1234 
  1242 
       
  1243 
  1235 !Set methodsFor:'searching'!
  1244 !Set methodsFor:'searching'!
  1236 
  1245 
  1237 findFirst:aBlock ifNone:exceptionValue
  1246 findFirst:aBlock ifNone:exceptionValue
  1238     "find the index of the first element, for which evaluation of the argument, aBlock returns true; 
  1247     "find the index of the first element, for which evaluation of the argument, aBlock returns true; 
  1239      return its index or the value from exceptionValue if none detected.
  1248      return its index or the value from exceptionValue if none detected.
  1322 ! !
  1331 ! !
  1323 
  1332 
  1324 !Set class methodsFor:'documentation'!
  1333 !Set class methodsFor:'documentation'!
  1325 
  1334 
  1326 version
  1335 version
  1327     ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.129 2014-12-30 12:35:29 cg Exp $'
  1336     ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.130 2015-02-04 19:58:53 stefan Exp $'
  1328 !
  1337 !
  1329 
  1338 
  1330 version_CVS
  1339 version_CVS
  1331     ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.129 2014-12-30 12:35:29 cg Exp $'
  1340     ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.130 2015-02-04 19:58:53 stefan Exp $'
  1332 ! !
  1341 ! !
  1333 
  1342 
  1334 
  1343 
  1335 Set initialize!
  1344 Set initialize!