Class SearchCompiler.KeyValue
- 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.KeyValue
-
- All Implemented Interfaces:
Predicate<OsmPrimitive>
- Enclosing class:
- SearchCompiler
public static class SearchCompiler.KeyValue extends SearchCompiler.TaggedMatch
Matches objects with the given key-value pair.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
caseSensitive
private String
key
private Pattern
keyPattern
private String
value
private Pattern
valuePattern
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getKey()
private String
getMv(Tagged osm)
String
getValue()
int
hashCode()
boolean
match(Tagged osm)
Tests whether the tagged object matches this criterion.String
toString()
-
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
-
keyPattern
private final Pattern keyPattern
-
valuePattern
private final Pattern valuePattern
-
caseSensitive
private final boolean caseSensitive
-
-
Constructor Detail
-
KeyValue
KeyValue(String key, String value, boolean regexSearch, boolean caseSensitive) throws SearchParseError
- Throws:
SearchParseError
-
-
Method Detail
-
match
public boolean match(Tagged osm)
Description copied from class:SearchCompiler.Match
Tests whether the tagged object matches this criterion.- Specified by:
match
in classSearchCompiler.TaggedMatch
- Parameters:
osm
- the tagged object to test- Returns:
- true if the tagged object matches this criterion
-
-