static Collection keysStartingWith2(S prefix, Map map) { if (empty(prefix)) ret keys(map); if (map instanceof NavigableMap) { S lastKey = lexicographicallyNextString(prefix); ret keys(((NavigableMap) map).subMap(prefix, true, lastKey, false)); } ret startingWith(prefix, keys(map)); } static Collection keysStartingWith2(Map map, S prefix) { ret keysStartingWith2(prefix, map); }