This chapter discusses probably the most used class hierarchy in Smalltalk; the collection class hierarchy. The collection classes are the basis upon which data structures are constructed in Smalltalk. Section two introduces the collection class hierarchy and the common functionality provided by all collection classes. Section three presents a decision tree to help identify the most appropriate collection class to use. Sections four, five and six present the Bag class, the Set class and the OrderedCollection class (respectively). Section seven then presents how the OrderedCollection class can be used to construct Stack and Queue classes.
KeywordsClass Definition Class Hierarchy Abstract Classis Instance Variable Class Creation
Unable to display preview. Download preview PDF.