For the purposes of the discussion I'm going to propose the following definitions:
Iterate: To say or perform again; repeat Thus Iterator: Something we use to repeatedly access the collection. In particular, the process of moving from one item to the next is repeatable.
Enumerate: To count off or name one by one; list It's not clear to me what the difference is between an Enumerator an Iterator. In this context.
Index: To guide, point out, or otherwise facilitate reference This would appear to be the ability to randomly access something.
This was essentially the point at which I started with my thoughts.
When you suggest objects of type
Iterator,
Indexer, and
Enumerator, I'm envisioning objects which interact with collections in specialized ways. Is the abstractions of such objects what you are attempting to get at?
Rambling on a bit more...
When I include a collection within my model, at the CIM level, I generally have a need to either impact the collection itself or interact with a subset of its items. I either want to
Modify the list of items in the collection (add, remove, count, etc.),
Notify the items of some event (as in the publish/subscribe pattern), or
Request a service of the Items (including a simple value mapping service). All of these are facilitated by messages which are Synchronous or Asynchronous. My desire is to see to it that these messages are sent to their targeted Items. I don't care how the messages are sent, how the Items are organized within the collection, nor the technology or route the messenger takes to effect delivery (unless the problem domain is the delivery of messages). In fact, in some cases, I don't even care if the message is successfully delivered or responded to.
I design, therefore, to the collector's interface which effects the delivery to the identified recipient(s) using the technologies and methodologies of the collector's choice. I prefer not to become too dependent upon the collector itself.
I would suggest that our definition of an Enumerator be broad enough to include control of Item access, Ordering and inclusion within the Collection. By Ordering I mean specification of the basis for ordering access to the Items, not the fact that the items are Ordered within the association. Can you clarify?
Yes. In another thread you said
isOrdered defines whether the Collection maintains an internal ordering based upon the identifier of the items such that a sequential traversal of the items will yield and ordered sequence.
My thought was to be able to request an
Enumeration (Ordered set

) with an ordering not maintained internally by the collector; such ordering to be specified in the request.
I think the terms Iterator, Enumerator relate to the services provided by the container of a Collection. I don't want to use the term Container (since I don't believe we've established that every Collection is a Container - only that every Container has a Collection), perhaps Collector (or Collection holonym).
Good point! I agree. However, I'm having difficulty thinking in terms of
Index,
Iterate, or
Enumerate at the CIM level. They seem to be denizens of a lower abstraction level.