--- a/OrderedCollection.st Sun Oct 04 12:04:15 2015 +0200
+++ b/OrderedCollection.st Tue Oct 06 11:05:30 2015 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -293,6 +291,19 @@
"Modified: / 12.11.1997 / 17:56:05 / cg"
!
+at:anInteger ifAbsent:exceptionValue
+ "return the element at index, anInteger.
+ If the index is invalid, return the value from exceptionValue"
+
+ |idx "{ Class: SmallInteger }"|
+
+ idx := anInteger + firstIndex - 1.
+ ((anInteger < 1) or:[idx > lastIndex]) ifTrue:[
+ ^ exceptionValue value
+ ].
+ ^ contentsArray basicAt:idx
+!
+
at:anInteger put:anObject
"set the element at index, to be anInteger.
Return anObject (sigh)."
@@ -2175,10 +2186,10 @@
!OrderedCollection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.120 2015-05-20 10:16:35 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.120 2015-05-20 10:16:35 cg Exp $'
+ ^ '$Header$'
! !