Class SearchCompiler.Match

java.lang.Object
org.openstreetmap.josm.data.osm.search.SearchCompiler.Match
All Implemented Interfaces:
Predicate<OsmPrimitive>
Direct Known Subclasses:
AutoFilterManager.Match, ContextSwitchTemplate.ContextProvider, SearchCompiler.AbstractBinaryMatch, SearchCompiler.Closed, SearchCompiler.Deleted, SearchCompiler.ExactType, SearchCompiler.HasRole, SearchCompiler.InArea, SearchCompiler.Incomplete, SearchCompiler.MapCSSMatch, SearchCompiler.Modified, SearchCompiler.New, SearchCompiler.Nth, SearchCompiler.Preset, SearchCompiler.RangeMatch, SearchCompiler.RoleMatch, SearchCompiler.Selected, SearchCompiler.TaggedMatch, SearchCompiler.UnaryMatch, SearchCompiler.Untagged, SearchCompiler.UserMatch
Enclosing class:
SearchCompiler

public abstract static class SearchCompiler.Match extends Object implements Predicate<OsmPrimitive>
Base class for all search criteria. If the criterion only depends on an object's tags, inherit from SearchCompiler.TaggedMatch.
  • Constructor Details

  • Method Details

    • match

      public abstract boolean match(OsmPrimitive osm)
      Tests whether the primitive matches this criterion.
      Parameters:
      osm - the primitive to test
      Returns:
      true if the primitive matches this criterion
    • match

      public boolean match(Tagged tagged)
      Tests whether the tagged object matches this criterion.
      Parameters:
      tagged - the tagged object to test
      Returns:
      true if the tagged object matches this criterion
    • test

      public final boolean test(OsmPrimitive object)
      Specified by:
      test in interface Predicate<OsmPrimitive>
    • validate

      Check if this is a valid match object
      Returns:
      this, for easy chaining
      Throws:
      SearchParseError - If the match is not valid