Class ExactMatchPoiCategoryFilter

java.lang.Object
org.mapsforge.poi.storage.ExactMatchPoiCategoryFilter
All Implemented Interfaces:
PoiCategoryFilter

public class ExactMatchPoiCategoryFilter extends Object implements PoiCategoryFilter
A category filter that accepts all categories added to it. Unless WhitelistPoiCategoryFilter no child categories of an added category are accepted.
  • Constructor Details

    • ExactMatchPoiCategoryFilter

      public ExactMatchPoiCategoryFilter()
      Default constructor.
  • Method Details

    • addCategory

      public void addCategory(PoiCategory category)
      Description copied from interface: PoiCategoryFilter
      Adds a category to the whitelist.
      Specified by:
      addCategory in interface PoiCategoryFilter
      Parameters:
      category - The category to be added.
    • getAcceptedCategories

      public Collection<PoiCategory> getAcceptedCategories()
      Specified by:
      getAcceptedCategories in interface PoiCategoryFilter
      Returns:
      Set of all categories that are accepted by this filter.
    • getAcceptedSuperCategories

      public Collection<PoiCategory> getAcceptedSuperCategories()
      Description copied from interface: PoiCategoryFilter
      Returns 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:
      getAcceptedSuperCategories in interface PoiCategoryFilter
      Returns:
      Set of top-level categories for all accepted categories.
    • isAcceptedCategory

      public boolean isAcceptedCategory(PoiCategory category)
      Description copied from interface: PoiCategoryFilter
      Returns true if a POI's category is accepted and therefore shall be added to the poi file.
      Specified by:
      isAcceptedCategory in interface PoiCategoryFilter
      Parameters:
      category - The POI's category.
      Returns:
      true if a POI's category is accepted and therefore shall be added to the poi file.