OsmAnd/DataExtractionOSM/src/net/osmand/data/PostCode.java
Victor Shcherb 50249440e2 change net.osmand
git-svn-id: https://osmand.googlecode.com/svn/trunk@455 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
2010-08-16 22:36:24 +00:00

35 lines
776 B
Java

package net.osmand.data;
import java.text.Collator;
import java.util.Collection;
import java.util.Map;
import java.util.TreeMap;
public class PostCode extends MapObject {
private Map<String, Street> streets = new TreeMap<String, Street>(Collator.getInstance());
public PostCode(String name){
setName(name);
setEnName(name);
setId(-1L);
}
public boolean isEmptyWithStreets(){
return streets.isEmpty();
}
public Street getStreet(String name){
return streets.get(name);
}
public Collection<Street> getStreets() {
return streets.values();
}
public Street registerStreet(Street street, boolean useEnglishNames){
String name = street.getName(useEnglishNames);
streets.put(name, street);
return street;
}
}