Class SearchCompiler.Any
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.search.SearchCompiler.Match
-
- org.openstreetmap.josm.data.osm.search.SearchCompiler.TaggedMatch
-
- org.openstreetmap.josm.data.osm.search.SearchCompiler.Any
-
- All Implemented Interfaces:
java.util.function.Predicate<OsmPrimitive>
- Enclosing class:
- SearchCompiler
private static class SearchCompiler.Any extends SearchCompiler.TaggedMatch
Match a string in any tags (key or value), with optional regex and case insensitivity.
-
-
Field Summary
Fields Modifier and Type Field Description private booleancaseSensitiveprivate java.lang.Stringsearchprivate java.util.regex.PatternsearchRegex
-
Constructor Summary
Constructors Constructor Description Any(java.lang.String s, boolean regexSearch, boolean caseSensitive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()booleanmatch(Tagged osm)Tests whether the tagged object matches this criterion.java.lang.StringtoString()-
Methods inherited from class org.openstreetmap.josm.data.osm.search.SearchCompiler.TaggedMatch
compilePattern, match
-
Methods inherited from class org.openstreetmap.josm.data.osm.search.SearchCompiler.Match
test, validate
-
-
-
-
Field Detail
-
search
private final java.lang.String search
-
searchRegex
private final java.util.regex.Pattern searchRegex
-
caseSensitive
private final boolean caseSensitive
-
-
Constructor Detail
-
Any
Any(java.lang.String s, boolean regexSearch, boolean caseSensitive) throws SearchParseError
- Throws:
SearchParseError
-
-
Method Detail
-
match
public boolean match(Tagged osm)
Description copied from class:SearchCompiler.MatchTests whether the tagged object matches this criterion.- Specified by:
matchin classSearchCompiler.TaggedMatch- Parameters:
osm- the tagged object to test- Returns:
- true if the tagged object matches this criterion
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-