Keys and Items

All Collection types (Maps, Arrays, Sets, strings) are series of Items, or values. Not all of these types have explicit keys; Sets in javascript don't have keys; however, in collect, Sets are treated as arrays of values with ordinal keys. You can get Set items by numeric keys and update the store by "setting" the item value of a set by key. Similarly, the Set storeIter returns number - value pairs, not value-value pairs as defined in the Set API.

That being said - just because you can inject values in a Set using mySetCollection.set(key, value) doesn't make it a good idea; addAfter is a much better way to inject values into sets.

Likewise, Strings were always treated as "quasi arrays" with indexed based accessors; in Collect strings are treated as arrays of characters, with all the get/set methods using integer keys.

This is part of the "normalization" of interface patterns that Collect provides.