Class AndOperator

    • Method Detail

      • applyOSM

        public boolean applyOSM​(OSMEntity entity)
        Description copied from interface: FilterExpression
        Apply the filter to an OSM entity.
        Parameters:
        entity - the OSM entity to check.
        Returns:
        true if the entity fulfills the specified filter, otherwise false.
      • applyOSH

        public boolean applyOSH​(OSHEntity entity)
        Description copied from interface: FilterExpression
        Apply the filter to an OSH entity.

        Must be compatible with the result of FilterExpression.applyOSM(org.heigit.ohsome.oshdb.osm.OSMEntity), e.g. that it must not return false when oshEntity.getVersions().….anyMatch(applyOSM) would evaluate to true.

        Parameters:
        entity - the OSH entity to check.
        Returns:
        false if the filter knows that none of the versions of the OSH entity can fulfill the specified filter, true otherwise.
      • applyOSMGeometry

        public boolean applyOSMGeometry​(OSMEntity entity,
                                        Supplier<org.locationtech.jts.geom.Geometry> geometrySupplier)
        Description copied from interface: FilterExpression
        Apply the filter to an "OSM feature" (i.e. an entity with a geometry).

        The default implementation doesn't perform a geometry type check, but any Filter can override it to do so.

        Parameters:
        entity - the OSM entity to check.
        geometrySupplier - a function returning the geometry of this OSM feature to check.
        Returns:
        true if the OSM feature fulfills the specified filter, otherwise false.
      • applyOSMEntitySnapshot

        public boolean applyOSMEntitySnapshot​(OSMEntitySnapshot snapshot)
        Description copied from interface: FilterExpression
        Apply a filter to a snapshot (OSMEntitySnapshot) of an OSM entity.
        Parameters:
        snapshot - a snapshot of the OSM entity to check
        Returns:
        true if the the OSM entity snapshot fulfills the specified filter, otherwise false.
      • applyOSMContribution

        public boolean applyOSMContribution​(OSMContribution contribution)
        Description copied from interface: FilterExpression
        Apply a filter to a contribution (OSMEntitySnapshot) to an OSM entity.

        A contribution matches the given filter if either the state of the OSM entity before the modification or the state of it after the modification matches the filter.

        Parameters:
        contribution - a modification of the OSM entity to check
        Returns:
        true if the the OSM contribution fulfills the specified filter, otherwise false.
      • negate

        public FilterExpression negate()
        Description copied from interface: FilterExpression
        Returns the opposite of the current filter expression.
        Returns:
        the opposite of the current filter expression.