Skip to main content

Collection and Map Classes for OOABL

Printer-friendly version

In developing a foundation framework for Object-Oriented ABL, it seems natural to consider creating a set of Collection classes since they have a broad utility in OO design in other languages. It also seems natural to consider imitating the Collection classes in Java since that is a tried and true implementation into which there has been a considerable investment of thought and effort. However, while Java Collection classes need to use relatively low level constructs like arrays and hash tables for implementation, in OOABL we have temp-tables, which not only provide a very easy and flexible way of maintaining a set, but which has the significant advantage of being open-ended (unlike an array) and having an automatic extension to disk. This use of temp-tables is likely to lead to a number of appropriate differences between a good OOABL implementation and the Java implementation.

Since Java Collection classes are a class hierarchy in which there are progressively more assumptions about the set, it seems likely that the use of temp-tables will obviate the need for some of the intermediate classes since there is no advantage to a defining a degenerate version once one is already using full featured temp-tables. I.e., if one has a concrete implementation using temp-tables, providing an alternate concrete implementation that also used temp-tables, but included less capability would be pointless. An example of this kind of distinction is that some Java Collection classes only provide for forward navigation in the Collection, but all of the OOABL classes described here provide both forward and backward navigation because it is trivial to include (i.e., Iterator versus ListIterator).

Download document to continue reading

Downloads include documentation, the collection and map classes, and test code for validating function.

Requires version 10.1A

AttachmentSize
CollectionClasses.pdf118.72 KB
CollectionClassesCode.zip9.74 KB
CollectionClassesTest.zip31.94 KB