OrderedCollection.st
changeset 1221 46d72af387e9
parent 1170 4250fe63479b
child 1290 15ba3221b89b
equal deleted inserted replaced
1220:99990bbb561f 1221:46d72af387e9
    84 	^ contentsArray at:idx
    84 	^ contentsArray at:idx
    85     ]
    85     ]
    86 !
    86 !
    87 
    87 
    88 at:anInteger put:anObject
    88 at:anInteger put:anObject
    89     "set the element at index, to be anInteger"
    89     "set the element at index, to be anInteger.
       
    90      Return anObject (sigh)."
    90 
    91 
    91     |idx|
    92     |idx|
    92 
    93 
    93     idx := anInteger + firstIndex - 1.
    94     idx := anInteger + firstIndex - 1.
    94     ((anInteger < 1) or:[idx > lastIndex]) ifTrue:[
    95     ((anInteger < 1) or:[idx > lastIndex]) ifTrue:[
    95 	^ self subscriptBoundsError:anInteger
    96         ^ self subscriptBoundsError:anInteger
    96     ] ifFalse:[
    97     ] ifFalse:[
    97 	^ contentsArray at:idx put:anObject
    98         ^ contentsArray at:idx put:anObject
    98     ]
    99     ]
       
   100 
       
   101     "Modified: 19.4.1996 / 11:31:16 / cg"
    99 !
   102 !
   100 
   103 
   101 first
   104 first
   102     "return the first element"
   105     "return the first element"
   103 
   106 
  1299 ! !
  1302 ! !
  1300 
  1303 
  1301 !OrderedCollection class methodsFor:'documentation'!
  1304 !OrderedCollection class methodsFor:'documentation'!
  1302 
  1305 
  1303 version
  1306 version
  1304     ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.45 1996-04-13 12:21:20 cg Exp $'
  1307     ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.46 1996-04-19 10:47:25 cg Exp $'
  1305 ! !
  1308 ! !