OrderedSet.st
changeset 24081 916a16fd5889
parent 24080 0cc60a09f225
child 24083 2c2aa640efbc
--- a/OrderedSet.st	Mon Apr 15 19:11:24 2019 +0200
+++ b/OrderedSet.st	Mon Apr 15 19:24:03 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2001 by eXept Software AG
               All Rights Reserved
@@ -132,6 +134,20 @@
     "Modified: / 16.11.2001 / 10:27:40 / cg"
 !
 
+atIndex:index
+    ^ order at:index
+
+    "Created: / 15-04-2019 / 19:14:27 / Stefan Vogel"
+!
+
+atIndex:index ifAbsent:aBlock
+    "return an element at a given index"
+
+    ^ order at:index ifAbsent:aBlock
+
+    "Created: / 15-04-2019 / 19:18:01 / Stefan Vogel"
+!
+
 order
     "returns the values in the order of their appearance"