Refactoring: reuse ACCEPT_ALL_POI_TYPE_FILTER

This commit is contained in:
Roman Inflianskas 2016-06-15 10:41:55 +03:00
parent b8e491d596
commit 8b5ccf1e30
2 changed files with 2 additions and 24 deletions

View file

@ -1070,18 +1070,7 @@ public class BinaryInspector {
MapUtils.get31TileNumberY(verbose.lattop),
MapUtils.get31TileNumberY(verbose.latbottom),
verbose.getZoom(),
new SearchPoiTypeFilter() {
@Override
public boolean accept(PoiCategory type, String subcategory) {
return true;
}
@Override
public boolean isEmpty() {
return false;
}
},
BinaryMapIndexReader.ACCEPT_ALL_POI_TYPE_FILTER,
new ResultMatcher<Amenity>() {
@Override
public boolean publish(Amenity object) {

View file

@ -2180,18 +2180,7 @@ public class BinaryMapIndexReader {
println(" " + poiRegion.subcategories.get(i));
}
SearchRequest<Amenity> req = buildSearchPoiRequest(sleft, sright, stop, sbottom, -1, new SearchPoiTypeFilter() {
@Override
public boolean accept(PoiCategory type, String subcategory) {
return true;
}
@Override
public boolean isEmpty() {
return false;
}
}, null);
SearchRequest<Amenity> req = buildSearchPoiRequest(sleft, sright, stop, sbottom, -1, ACCEPT_ALL_POI_TYPE_FILTER, null);
List<Amenity> results = reader.searchPoi(req);
for (Amenity a : results) {
println(a.getType() + " " + a.getSubType() + " " + a.getName() + " " + a.getLocation());