x
authorClaus Gittinger <cg@exept.de>
Sun, 18 Jun 2017 22:43:12 +0200
changeset 4400 23f57acf91ff
parent 4399 cbcf2fc08cf4
child 4401 a29669a0e2a1
x
extensions.st
--- a/extensions.st	Sun Jun 18 17:54:28 2017 +0200
+++ b/extensions.st	Sun Jun 18 22:43:12 2017 +0200
@@ -741,6 +741,15 @@
 
 !Collection methodsFor:'converting'!
 
+asIdentitySkipList
+	"Answer a IdentitySkipList whose elements are the elements of the 
+	receiver. The sort order is the default less than or equal."
+
+	^ self as: IdentitySkipList
+! !
+
+!Collection methodsFor:'converting'!
+
 asList
     "return a new List with the receiver collection's elements"
 
@@ -794,6 +803,29 @@
     ^ SharedCollection for:self.
 ! !
 
+!Collection methodsFor:'converting'!
+
+asSkipList
+	"Answer a SkipList whose elements are the elements of the 
+	receiver. The sort order is the default less than or equal."
+
+	^ self as: SkipList
+! !
+
+!Collection methodsFor:'converting'!
+
+asSkipList: aSortBlock 
+        "Answer a SkipList whose elements are the elements of the 
+        receiver. The sort order is defined by the argument, aSortBlock."
+
+        | skipList |
+        skipList := SkipList new: self size sortBlock: aSortBlock.
+        skipList addAll: self.
+        ^ skipList
+
+    "Modified (comment): / 18-06-2017 / 22:40:10 / cg"
+! !
+
 !Float methodsFor:'private'!
 
 absDecimalPrintOn:aStream digits:digits