Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

6.8 Creating Your Own Collection Class

If you want to create your own collection class, you can extend the abstract base class CollectionBase, which implements the Collection interface. Use the protected member variable nitems_ to maintain the count of elements within the collection. Of course, all the abstract methods must be overridden in the derived class, except for methods size() and isEmpty(), which are marked final and cannot be overridden. Implementations are also provided for the apply() and reduce() methods.



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.