public Map<Integer, Object> apply(final Iterator<?> iterator) {
            final Map<Integer, Object> map = new LinkedHashMap<>();
            int i = 0;
            while (iterator.hasNext()) {
                map.put(i++, iterator.next());
            }
            return Collections.unmodifiableMap(map);
        }
Type of the index as it corresponds to the associated {@link WithOptions#list} and {@link WithOptions#map}.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/IndexStep.java