public default Map<String, Object> asMap() {
        final Map<String, Object> map = keys().stream()
                .map(key -> Pair.with(key, get(key)))
                .collect(Collectors.toMap(Pair::getValue0, Pair::getValue1));
        return Collections.unmodifiableMap(map);
    }
A helper method that generates a {@link Map} of the memory key/values.

@return the map representation of the memory key/values
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/Memory.java