--- a/Coll.st Mon Sep 15 22:24:58 1997 +0200
+++ b/Coll.st Mon Sep 15 22:28:03 1997 +0200
@@ -10,6 +10,8 @@
hereby transferred.
"
+'From Smalltalk/X, Version:3.1.10 on 13-sep-1997 at 10:56:49 pm' !
+
Object subclass:#Collection
instanceVariableNames:''
classVariableNames:'InvalidKeySignal EmptyCollectionSignal ValueNotFoundSignal
@@ -688,6 +690,72 @@
^ aSortedCollection
!
+asSortedStrings
+ "Create & return a SortedCollection that sorts the receivers
+ elements according to the locales collating policy.
+ This is currently not really support - strings are sorted
+ without caring for the locale."
+
+ |aSortedCollection|
+
+ aSortedCollection := SortedCollection forStrings:self size.
+ aSortedCollection addAll:self.
+ ^ aSortedCollection
+
+ "Created: 13.9.1997 / 09:36:22 / cg"
+ "Modified: 13.9.1997 / 09:43:00 / cg"
+!
+
+asSortedStrings:sortBlock
+ "Create & return a SortedCollection that sorts the receivers
+ elements using sortBlock and according to the locales collating policy.
+ This is currently not really support - strings are sorted
+ without caring for the locale."
+
+ |aSortedCollection|
+
+ aSortedCollection := SortedCollection forStrings:self size.
+ aSortedCollection sortBlock:sortBlock.
+ aSortedCollection addAll:self.
+ ^ aSortedCollection
+
+ "Created: 13.9.1997 / 09:36:45 / cg"
+ "Modified: 13.9.1997 / 09:42:50 / cg"
+!
+
+asSortedStrings:sortBlock with:aCollationPolicy
+ "Create & return a SortedCollection that sorts the receivers
+ elements using sortBlock and according to the specified locales collating policy.
+ This is currently not really support - strings are sorted
+ without caring for the locale."
+
+ |aSortedCollection|
+
+ aSortedCollection := SortedCollection forStrings:self size collatedBy:aCollationPolicy.
+ aSortedCollection sortBlock:sortBlock.
+ aSortedCollection addAll:self.
+ ^ aSortedCollection
+
+ "Created: 13.9.1997 / 09:37:21 / cg"
+ "Modified: 13.9.1997 / 09:45:27 / cg"
+!
+
+asSortedStringsWith: aCollationPolicy
+ "Create & return a SortedCollection that sorts the receivers
+ elements according to the specified locales collating policy.
+ This is currently not really support - strings are sorted
+ without caring for the locale."
+
+ |aSortedCollection|
+
+ aSortedCollection := SortedCollection forStrings:self size collatedBy:aCollationPolicy.
+ aSortedCollection addAll:self.
+ ^ aSortedCollection
+
+ "Created: 13.9.1997 / 09:37:50 / cg"
+ "Modified: 13.9.1997 / 09:44:08 / cg"
+!
+
asString
"return a String with the collections elements
(which must convert to characters)"
@@ -1637,6 +1705,6 @@
!Collection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/Coll.st,v 1.70 1997-05-26 15:39:16 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/Coll.st,v 1.71 1997-09-15 20:28:03 cg Exp $'
! !
Collection initialize!
--- a/Collection.st Mon Sep 15 22:24:58 1997 +0200
+++ b/Collection.st Mon Sep 15 22:28:03 1997 +0200
@@ -10,6 +10,8 @@
hereby transferred.
"
+'From Smalltalk/X, Version:3.1.10 on 13-sep-1997 at 10:56:49 pm' !
+
Object subclass:#Collection
instanceVariableNames:''
classVariableNames:'InvalidKeySignal EmptyCollectionSignal ValueNotFoundSignal
@@ -688,6 +690,72 @@
^ aSortedCollection
!
+asSortedStrings
+ "Create & return a SortedCollection that sorts the receivers
+ elements according to the locales collating policy.
+ This is currently not really support - strings are sorted
+ without caring for the locale."
+
+ |aSortedCollection|
+
+ aSortedCollection := SortedCollection forStrings:self size.
+ aSortedCollection addAll:self.
+ ^ aSortedCollection
+
+ "Created: 13.9.1997 / 09:36:22 / cg"
+ "Modified: 13.9.1997 / 09:43:00 / cg"
+!
+
+asSortedStrings:sortBlock
+ "Create & return a SortedCollection that sorts the receivers
+ elements using sortBlock and according to the locales collating policy.
+ This is currently not really support - strings are sorted
+ without caring for the locale."
+
+ |aSortedCollection|
+
+ aSortedCollection := SortedCollection forStrings:self size.
+ aSortedCollection sortBlock:sortBlock.
+ aSortedCollection addAll:self.
+ ^ aSortedCollection
+
+ "Created: 13.9.1997 / 09:36:45 / cg"
+ "Modified: 13.9.1997 / 09:42:50 / cg"
+!
+
+asSortedStrings:sortBlock with:aCollationPolicy
+ "Create & return a SortedCollection that sorts the receivers
+ elements using sortBlock and according to the specified locales collating policy.
+ This is currently not really support - strings are sorted
+ without caring for the locale."
+
+ |aSortedCollection|
+
+ aSortedCollection := SortedCollection forStrings:self size collatedBy:aCollationPolicy.
+ aSortedCollection sortBlock:sortBlock.
+ aSortedCollection addAll:self.
+ ^ aSortedCollection
+
+ "Created: 13.9.1997 / 09:37:21 / cg"
+ "Modified: 13.9.1997 / 09:45:27 / cg"
+!
+
+asSortedStringsWith: aCollationPolicy
+ "Create & return a SortedCollection that sorts the receivers
+ elements according to the specified locales collating policy.
+ This is currently not really support - strings are sorted
+ without caring for the locale."
+
+ |aSortedCollection|
+
+ aSortedCollection := SortedCollection forStrings:self size collatedBy:aCollationPolicy.
+ aSortedCollection addAll:self.
+ ^ aSortedCollection
+
+ "Created: 13.9.1997 / 09:37:50 / cg"
+ "Modified: 13.9.1997 / 09:44:08 / cg"
+!
+
asString
"return a String with the collections elements
(which must convert to characters)"
@@ -1637,6 +1705,6 @@
!Collection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.70 1997-05-26 15:39:16 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.71 1997-09-15 20:28:03 cg Exp $'
! !
Collection initialize!