--- a/Collection.st Mon Jul 17 17:02:48 2017 +0200
+++ b/Collection.st Mon Jul 17 17:12:37 2017 +0200
@@ -275,6 +275,7 @@
^ self newWithSize:n
! !
+
!Collection class methodsFor:'Signal constants'!
emptyCollectionSignal
@@ -557,6 +558,7 @@
"Created: / 22-10-2008 / 21:29:27 / cg"
! !
+
!Collection methodsFor:'accessing'!
anElement
@@ -808,6 +810,8 @@
|theLastOne any|
+ Logger info:'slow last (uses enumeration)'.
+
any := false.
self do:[:e | any := true. theLastOne := e].
any ifTrue:[
@@ -816,6 +820,8 @@
"error if collection is empty"
^ self emptyCollectionError
+
+ "Modified: / 17-07-2017 / 17:12:24 / cg"
!
last:n
@@ -924,6 +930,8 @@
|theSecondLastOne theLastOne cnt|
+ Logger info:'slow secondLast (uses enumeration)'.
+
cnt := 0.
self do:[:e | cnt := cnt+1. theSecondLastOne := theLastOne. theLastOne := e].
@@ -933,6 +941,8 @@
"error if collection did not enumerate at least 2 elements"
^ self notEnoughElementsError
+
+ "Modified: / 17-07-2017 / 17:12:28 / cg"
!
seventh
@@ -6065,6 +6075,7 @@
^ aVisitor visitCollection:self with:aParameter
! !
+
!Collection class methodsFor:'documentation'!
version