Formatting

This commit is contained in:
Roman Inflianskas 2016-05-17 16:45:12 +03:00
parent 17d25971cb
commit 4ad562867e
4 changed files with 8 additions and 10 deletions

View file

@ -164,7 +164,7 @@ public class BinaryMapIndexReader {
int tag = WireFormat.getTagFieldNumber(t); int tag = WireFormat.getTagFieldNumber(t);
switch (tag) { switch (tag) {
case 0: case 0:
if(!initCorrectly){ if (!initCorrectly) {
//throw new IOException("Corrupted file. It should be ended as it starts with version"); //$NON-NLS-1$ //throw new IOException("Corrupted file. It should be ended as it starts with version"); //$NON-NLS-1$
throw new IOException("Corrupt file, it should have ended as it starts with version: " + file.getName()); //$NON-NLS-1$ throw new IOException("Corrupt file, it should have ended as it starts with version: " + file.getName()); //$NON-NLS-1$
} }

View file

@ -50,7 +50,6 @@ public class BinaryMapPoiReaderAdapter {
} }
public static class PoiRegion extends BinaryIndexPart { public static class PoiRegion extends BinaryIndexPart {
List<String> categories = new ArrayList<String>(); List<String> categories = new ArrayList<String>();
List<PoiCategory> categoriesType = new ArrayList<PoiCategory>(); List<PoiCategory> categoriesType = new ArrayList<PoiCategory>();
List<List<String> > subcategories = new ArrayList<List<String> >(); List<List<String> > subcategories = new ArrayList<List<String> >();

View file

@ -33,7 +33,6 @@ public class BinaryMapTransportReaderAdapter {
} }
public static class TransportIndex extends BinaryIndexPart { public static class TransportIndex extends BinaryIndexPart {
int left = 0; int left = 0;
int right = 0; int right = 0;
int top = 0; int top = 0;

View file

@ -17,7 +17,7 @@ public class City extends MapObject {
private double radius; private double radius;
private CityType(double radius) { CityType(double radius) {
this.radius = radius; this.radius = radius;
} }
@ -33,10 +33,10 @@ public class City extends MapObject {
if (place == null) { if (place == null) {
return null; return null;
} }
if("township".equals(place)) { if ("township".equals(place)) {
return CityType.TOWN; return CityType.TOWN;
} }
if("borough".equals(place)) { if ("borough".equals(place)) {
return CityType.SUBURB; return CityType.SUBURB;
} }
for (CityType t : CityType.values()) { for (CityType t : CityType.values()) {
@ -59,7 +59,7 @@ public class City extends MapObject {
} }
public City(CityType type) { public City(CityType type) {
if(type == null) { if (type == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
this.type = type; this.type = type;
@ -114,15 +114,15 @@ public class City extends MapObject {
@Override @Override
public String toString() { public String toString() {
if(isPostcode()) { if (isPostcode()) {
return "Postcode : " + getName(); //$NON-NLS-1$ //$NON-NLS-2$ return "Postcode : " + getName(); //$NON-NLS-1$ //$NON-NLS-2$
} }
return "City [" + type + "] " + getName(); //$NON-NLS-1$ //$NON-NLS-2$ return "City [" + type + "] " + getName(); //$NON-NLS-1$ //$NON-NLS-2$
} }
public Street getStreetByName(String name) { public Street getStreetByName(String name) {
for(Street s : listOfStreets) { for (Street s : listOfStreets) {
if(s.getName().equalsIgnoreCase(name)) { if (s.getName().equalsIgnoreCase(name)) {
return s; return s;
} }
} }