Return a Map where the keys are the indices and the values the elements of this set.
Map<int, E?> asMap() { Map<int, E?> map = Map<int, E?>(); for (int i = 0; i < length; i++) map[i] = elementAt(i); return map; }