Package org.mapsforge.poi.storage
Class ExactMatchPoiCategoryFilter
- java.lang.Object
-
- org.mapsforge.poi.storage.ExactMatchPoiCategoryFilter
-
- All Implemented Interfaces:
PoiCategoryFilter
public class ExactMatchPoiCategoryFilter extends java.lang.Object implements PoiCategoryFilter
A category filter that accepts all categories added to it. UnlessWhitelistPoiCategoryFilterno child categories of an added category are accepted.
-
-
Constructor Summary
Constructors Constructor Description ExactMatchPoiCategoryFilter()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCategory(PoiCategory category)Adds a category to the whitelist.java.util.Collection<PoiCategory>getAcceptedCategories()java.util.Collection<PoiCategory>getAcceptedSuperCategories()Returns a set of top-level categories for all accepted categories.booleanisAcceptedCategory(PoiCategory category)Returns true if a POI's category is accepted and therefore shall be added to the poi file.
-
-
-
Method Detail
-
addCategory
public void addCategory(PoiCategory category)
Description copied from interface:PoiCategoryFilterAdds a category to the whitelist.- Specified by:
addCategoryin interfacePoiCategoryFilter- Parameters:
category- The category to be added.
-
getAcceptedCategories
public java.util.Collection<PoiCategory> getAcceptedCategories()
- Specified by:
getAcceptedCategoriesin interfacePoiCategoryFilter- Returns:
- Set of all categories that are accepted by this filter.
-
getAcceptedSuperCategories
public java.util.Collection<PoiCategory> getAcceptedSuperCategories()
Description copied from interface:PoiCategoryFilterReturns a set of top-level categories for all accepted categories. These are all accepted categories whose parent category is null or not an accepted category.- Specified by:
getAcceptedSuperCategoriesin interfacePoiCategoryFilter- Returns:
- Set of top-level categories for all accepted categories.
-
isAcceptedCategory
public boolean isAcceptedCategory(PoiCategory category)
Description copied from interface:PoiCategoryFilterReturns true if a POI's category is accepted and therefore shall be added to the poi file.- Specified by:
isAcceptedCategoryin interfacePoiCategoryFilter- Parameters:
category- The POI's category.- Returns:
- true if a POI's category is accepted and therefore shall be added to the poi file.
-
-