ABSTRACT

Often an application needs to maintain a collection of elements that are accessed via their position in a line (with 0 being the position of the first element in the line) or via their location relative to other elements in the line. In a positional collection, the iteration order is given by: position 0, position 1, . . ., position n−1. Depending on the needs of the application program, either an array-based or listbased data structure may be best. We first describe how the PositionalCollection interface extends the Collection interface and then discuss the issues related to selecting the best data structure.