--- a/SortedCollection.st Mon Sep 18 10:59:17 2006 +0200
+++ b/SortedCollection.st Mon Sep 18 11:00:06 2006 +0200
@@ -266,6 +266,16 @@
!SortedCollection methodsFor:'accessing'!
+max
+ "Return the largest element."
+
+ ^ self last
+
+ "
+ #(10 35 20 45 30 5) asSortedCollection max
+ "
+!
+
median
"Return the middle element, or as close as we can get."
@@ -275,6 +285,16 @@
#(10 35 20 45 30 5) asSortedCollection median
#(10 35 20 45 30 5) median
"
+!
+
+min
+ "Return the smallest element."
+
+ ^ self first
+
+ "
+ #(10 35 20 45 30 5) asSortedCollection min
+ "
! !
!SortedCollection methodsFor:'adding & removing'!
@@ -851,7 +871,7 @@
!SortedCollection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/SortedCollection.st,v 1.58 2006-01-24 11:20:46 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/SortedCollection.st,v 1.59 2006-09-18 09:00:06 cg Exp $'
! !
SortedCollection initialize!