--- a/SequenceableCollection.st Fri Feb 18 15:45:54 2000 +0100
+++ b/SequenceableCollection.st Fri Feb 18 19:01:04 2000 +0100
@@ -928,6 +928,40 @@
"Modified: / 27.3.1998 / 17:33:49 / cg"
!
+identicalContentsAs:aCollection
+ "return true if the receiver and aCollection represent collections
+ with identical contents. This is much like #=, but compares
+ elements using #== instead of #=."
+
+ |index "{ Class: SmallInteger }"
+ stop "{ Class: SmallInteger }" |
+
+ (aCollection == self) ifTrue:[^ true].
+ (aCollection isSequenceable) ifFalse:[^ false].
+
+ stop := self size.
+ stop == (aCollection size) ifFalse:[^ false].
+
+ index := 1.
+ [index <= stop] whileTrue:[
+ (self at:index) == (aCollection at:index) ifFalse:[^ false].
+ index := index + 1
+ ].
+ ^ true
+
+ "
+ #(1 2 3 4 5) = #(1 2 3 4 5)
+ #(1 2 3 4 5) = #(1.0 2 3 4.0 5)
+ #($1 $2 $3 $4 $5) = '12345'
+
+ #(1 2 3 4 5) identicalContentsAs:#(1 2 3 4 5)
+ #(1 2 3 4 5) identicalContentsAs: #(1.0 2 3 4.0 5)
+ #($1 $2 $3 $4 $5) identicalContentsAs: '12345'
+ "
+
+ "Modified: / 18.2.2000 / 19:04:27 / cg"
+!
+
startsWith:aCollection
"return true, if the receivers first elements match those
of aCollection
@@ -4664,6 +4698,6 @@
!SequenceableCollection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.128 2000-02-03 13:18:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.129 2000-02-18 18:01:04 cg Exp $'
! !
SequenceableCollection initialize!