Looks good, but I'd still like to see unique/multiple indices in that inherit structure, at least in favor of the Map/Set division (which I assume means with/without values).
Why must there be an order for index() to make sense?
/ Martin Stjernholm, Roxen IS
Previous text:
2002-10-31 11:46: Subject: Proposal for new ADT interface
Realised something similar when I was testing different algorithms yesterday. A lot of them were only useful on ordered collections. I shall try out a structure like this.
Collection |-----------> Ordered Collection | | | |--------> Sequence | |--------> Ordered Set <------| | |--------> Ordered Map <--| | |----> Map --------------------------------------| | |----> Set ------------------------------------------|
And two different iterators, the basic iterator and the ordered iterator where you are guaranteed to get the same order each time and index(), '<' and '>' make sense.
/ Peta, jo det är jag