# SortedCollection

SortedCollection inherits from OrderedCollection and defines the instance variable sortBlock. It has no subclasses.

SortedCollections maintain their elements in a sorted order as specified by the sortBlock.

## Methods defined in SortedCollection:

### Methods for accessing:

- at: index put: value
- sortBlock
- sortBlock: block
- species

### Methods for adding/removing:

- add: object
- add: object afterIndex: index
- addAll: collection
  More efficient than repeated #add:'s for large numbers of additions.

### Methods for converting:

- asSortedCollection

### Methods for copying:

- copyEmpty

### Methods for initialization:

- initSortBlock: block

### Methods for private:

- sortFrom: i to: j
  as is required by law, here is the usual inscrutable sort algorithm

### Methods for utility:

- resort

Pocket Smalltalk Documentation