OrderedCollection.st
branchjv
changeset 18011 deb0c3355881
parent 17938 e2aad1d7c317
parent 14616 e763997b09d1
child 18037 4cf874da38c9
--- a/OrderedCollection.st	Thu Dec 20 11:48:59 2012 +0000
+++ b/OrderedCollection.st	Sat Jan 19 01:30:00 2013 +0000
@@ -1112,29 +1112,6 @@
     ^ newCollection
 !
 
-copyWith:newElement
-    "return a new collection containing the receivers elements
-     and the single new element, newElement. 
-     This is different from concatentation, which expects another collection
-     as argument, but equivalent to copy-and-addLast."
-
-    |newCollection mySize newSize|
-
-    mySize := self size.
-    newSize := mySize + 1.
-    newCollection := self copyEmptyAndGrow:newSize. "must grow, otherwise replace fails"
-    newCollection replaceFrom:1 to:mySize with:self startingAt:1.
-    newCollection at:newSize put:newElement.
-    ^newCollection
-
-    "
-     #(1 2 3 4 5) copyWith:$a
-     'abcdefg' copyWith:$h
-     'abcdefg' copyWith:'123'    -- will fail: string cannot be stored into string
-     'abcdefg' copyWith:1        -- will fail: integer cannot be stored into string
-    "
-!
-
 postCopy
     "have to copy the contentsArray too"
 
@@ -1408,7 +1385,6 @@
 ! !
 
 
-
 !OrderedCollection methodsFor:'private'!
 
 initContents:size
@@ -1957,12 +1933,6 @@
 !OrderedCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.100 2012/04/01 11:24:38 cg Exp $'
-!
-
-version_SVN
-    ^ '$Id: OrderedCollection.st 10804 2012-04-13 13:18:13Z vranyj1 $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.101 2012-12-21 11:59:35 cg Exp $'
 ! !
 
-
-