--- a/OrderedCollection.st Tue Mar 31 11:24:40 2020 +0200
+++ b/OrderedCollection.st Tue Mar 31 11:38:32 2020 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -855,6 +853,7 @@
srcIndex := firstIndex.
lastIdx := lastIndex.
+ removedElements := OrderedCollection new.
[
srcIndex > lastIdx
or:[ aBlock value:(contentsArray at:srcIndex) ]
@@ -862,12 +861,12 @@
srcIndex := srcIndex + 1.
].
srcIndex > lastIdx ifTrue:[
- "/ nothing removed
- ^ #()
+ "/ nothing removed. Answer an empty OrderedCollection (not an Array)
+ "/ maybe sender wants to add elements.
+ ^ removedElements
].
"/ now srcIndex is the index of element, which is the first to be removed
- removedElements := OrderedCollection new.
removedElements add:(contentsArray at:srcIndex).
dstIndex := srcIndex.
@@ -972,7 +971,9 @@
(10000) - 130 290 260
(50000) - 720 1470 1300
"
- "Modified: 8.2.1997 / 19:19:00 / cg"
+
+ "Modified: / 08-02-1997 / 19:19:00 / cg"
+ "Modified: / 31-03-2020 / 11:36:20 / Stefan Vogel"
!
removeFirst
@@ -1860,6 +1861,7 @@
! !
+
!OrderedCollection methodsFor:'private'!
containerClass