OrdColl.st
changeset 407 4656034aa781
parent 387 cdf48d5d7399
child 506 984b32fe635a
equal deleted inserted replaced
406:ed16ba9383c3 407:4656034aa781
    19 
    19 
    20 OrderedCollection comment:'
    20 OrderedCollection comment:'
    21 COPYRIGHT (c) 1989 by Claus Gittinger
    21 COPYRIGHT (c) 1989 by Claus Gittinger
    22 	      All Rights Reserved
    22 	      All Rights Reserved
    23 
    23 
    24 $Header: /cvs/stx/stx/libbasic/Attic/OrdColl.st,v 1.32 1995-08-12 22:54:52 claus Exp $
    24 $Header: /cvs/stx/stx/libbasic/Attic/OrdColl.st,v 1.33 1995-08-24 20:41:22 claus Exp $
    25 '!
    25 '!
    26 
    26 
    27 !OrderedCollection class methodsFor:'documentation'!
    27 !OrderedCollection class methodsFor:'documentation'!
    28 
    28 
    29 copyright
    29 copyright
    40 "
    40 "
    41 !
    41 !
    42 
    42 
    43 version
    43 version
    44 "
    44 "
    45 $Header: /cvs/stx/stx/libbasic/Attic/OrdColl.st,v 1.32 1995-08-12 22:54:52 claus Exp $
    45 $Header: /cvs/stx/stx/libbasic/Attic/OrdColl.st,v 1.33 1995-08-24 20:41:22 claus Exp $
    46 "
    46 "
    47 !
    47 !
    48 
    48 
    49 documentation
    49 documentation
    50 "
    50 "
   363      #(1 2 3 4 5) asOrderedCollection removeFromIndex:3 toIndex:6
   363      #(1 2 3 4 5) asOrderedCollection removeFromIndex:3 toIndex:6
   364     "
   364     "
   365 !
   365 !
   366 
   366 
   367 remove:anObject ifAbsent:exceptionBlock
   367 remove:anObject ifAbsent:exceptionBlock
   368     "remove the first occurrence of anObject from the collection;
   368     "remove the first occurrence of anObject from the collection
   369      return the value of exceptionBlock if anObject is not in
   369      and return it.
   370      the collection"
   370      If its not in the receiver collection, return the value of exceptionBlock."
   371 
   371 
   372     |index "{ Class:SmallInteger }"|
   372     |index "{ Class:SmallInteger }"|
   373 
   373 
   374     index := firstIndex.
   374     index := firstIndex.
   375     [index <= lastIndex] whileTrue:[
   375     [index <= lastIndex] whileTrue:[