Next: , Previous: , Up: Base classes   [Index]


1.156 SortedCollection

Defined in namespace Smalltalk
Superclass: OrderedCollection
Category: Collections-Sequenceable

I am a collection of objects, stored and accessed according to some sorting criteria. I store things using heap sort and quick sort. My instances have a comparison block associated with them; this block takes two arguments and is a predicate which returns true if the first argument should be sorted earlier than the second. The default block is [ :a :b | a <= b ], but I will accept any block that conforms to the above criteria – actually any object which responds to #value:value:.