Interface Filter

    • Method Detail

      • byOSHEntity

        static Filter byOSHEntity​(OSHEntityFilter oshCallback)
        Constructs a simple filter based on a predicate on OSH entities.

        The callback is called once for each OSH entity and decides whether it should be kept (by returning true) or discarded (by returning false).

        Example: `Filter.byOSHEntity(entity -> entity.getId() == 42);`

        Parameters:
        oshCallback - predicate which tests osh entities
        Returns:
        a filter object which filters using the given predicate
      • byOSMEntity

        static Filter byOSMEntity​(OSMEntityFilter osmCallback)
        Constructs a simple filter based on a predicate on OSM entities.

        The callback is called once for each OSM entity and decides whether it should be kept (by returning true) or discarded (by returning false).

        Example: `Filter.byOSMEntity(entity -> entity.getVersion() == 1);`

        Parameters:
        osmCallback - predicate which tests osm entities
        Returns:
        a filter object which filters using the given predicate