Object <- ConcatenatedList |
|
|
At Remove SectionIndex |
|
ComponentLists Count NumberOfComponentLists |
| Field | Type | |
|---|---|---|
| ConcatenatedList: | componentLists: | ObjectList |
instance ConcatenatedList tag; componentLists: nilObject; end instance;
Define Class ConcatenatedList; inherits from Object, HasCount, HasIndexing; field componentLists: ObjectList, getter; // used by ComponentLists attribute attribute ComponentLists: ObjectList, readOnly; // a list containing the set of lists, in order, from which self is composed operation SectionIndex(section: Unsigned): Unsigned; // return the index of the first element of the passed in section overrides Count; // returns sum of counts of lists in components field overrides At; // computes which element to return by treating self as a concatenation // of all sub-lists in components field operation Remove(element: Object), noFail; // searches through sublists for element and removes it if found. attribute NumberOfComponentLists: Unsigned, readOnly; // number of ComponentLists. end class;