SequenceableCollection.st
branchjv
changeset 17754 5322906cdb6a
parent 17751 b2273fa8d59f
child 17761 b0e5971141bc
--- a/SequenceableCollection.st	Thu Feb 25 22:58:21 2010 +0000
+++ b/SequenceableCollection.st	Mon Mar 08 21:39:02 2010 +0000
@@ -1928,20 +1928,6 @@
     ^ true
 !
 
-isSoapEncSameAs: comparand
-	"Answer whether the receiver and the <Object> argument, comparand,
-	are considered equivalent in terms of the soap-enc rules."
-
-	| size |
-	#swAdded.
-	self == comparand ifTrue: [^true].
-	self species == comparand species ifFalse: [^false].
-	size := self size.
-	size = comparand size ifFalse: [^false].
-	1 to: size do: [:i | ((self at: i) isSoapEncSameAs: (comparand at: i)) ifFalse: [^false]].
-	^true
-!
-
 sameContentsAs:aCollection whenComparedWith:compareBlock
     "return true if the receiver and aCollection represent collections
      with the same contents, using compareSelector to compare elements.
@@ -3762,6 +3748,26 @@
     "
 !
 
+repeatedConcatenation:nTimes
+    "return a new collection consisting of nTimes the concatenation of the receiver"
+
+    |newColl idx|
+
+    newColl := self species new:(self size * nTimes).
+    idx := 1.
+    nTimes timesRepeat:[
+        newColl replaceFrom:idx with:self startingAt:1.
+        idx := idx + self size.
+    ].
+    ^ newColl
+
+    "
+     'hello' repeatedConcatenation:5
+     #[1 2 3] repeatedConcatenation:3
+     #(1 2 3) repeatedConcatenation:1
+    "
+!
+
 restAfter:anElement
     "return a new collection consisting of the receivers elements after
      (but excluding) anElement.
@@ -7736,7 +7742,6 @@
     "Modified: 21.8.1997 / 18:30:49 / cg"
 ! !
 
-
 !SequenceableCollection methodsFor:'testing'!
 
 includesKey:anIndex
@@ -7764,11 +7769,11 @@
 !SequenceableCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Id: SequenceableCollection.st 10501 2010-02-13 23:34:44Z vranyj1 $'
+    ^ '$Id: SequenceableCollection.st 10505 2010-03-08 21:39:02Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.293 2010/02/10 17:46:45 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.294 2010/03/04 13:18:13 cg Exp §'
 ! !
 
 SequenceableCollection initialize!
@@ -7777,3 +7782,4 @@
 
 
 
+