src/main/java/com/conveyal/gtfs/model/ShapeMap.java
@Override
    public Set<Integer> keySet() {
        // use a linkedhashset so values come out in order
        Set<Integer> ret = new LinkedHashSet<>();

        for (Tuple2<String, Integer> t : wrapped.keySet()) {
            ret.add(t.b);
        }

        // Don't let the user modify the set as it won't do what they expect (change the map)
        return Collections.unmodifiableSet(ret);
    }
@Override
    public Set<Integer> keySet() {
        // use a linkedhashset so values come out in order
        Set<Integer> ret = new LinkedHashSet<>();

        for (Tuple2<String, Integer> t : wrapped.keySet()) {
            ret.add(t.b);
        }

        // Don't let the user modify the set as it won't do what they expect (change the map)
        return Collections.unmodifiableSet(ret);
    }
We currently just expose them as immutable sets in RAM, since all of the modification operations are optional.