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
Base class for all search criteria. If the criterion only depends on an object's tags,
inherit from
SearchCompiler.TaggedMatch.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanmatch(OsmPrimitive osm) Tests whether the primitive matches this criterion.booleanTests whether the tagged object matches this criterion.final booleantest(OsmPrimitive object) validate()Check if this is a valid match object
-
Constructor Details
-
Match
public Match()
-
-
Method Details
-
match
Tests whether the primitive matches this criterion.- Parameters:
osm- the primitive to test- Returns:
- true if the primitive matches this criterion
-
match
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
- Specified by:
testin interfacePredicate<OsmPrimitive>
-
validate
Check if this is a valid match object- Returns:
this, for easy chaining- Throws:
SearchParseError- If the match is not valid
-