146
146
final SortedMap<Integer, String> phonePrefixMap = new TreeMap<Integer, String>();
147
147
parseTextFile(input, new PhonePrefixMappingHandler() {
149
148
public void process(int prefix, String location) {
150
149
if (phonePrefixMap.put(prefix, location) != null) {
151
150
throw new RuntimeException(String.format("duplicated prefix %d", prefix));