Class SearchCompiler.BooleanMatch
- 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.BooleanMatch
-
- All Implemented Interfaces:
java.util.function.Predicate<OsmPrimitive>
- Enclosing class:
- SearchCompiler
public static class SearchCompiler.BooleanMatch extends SearchCompiler.TaggedMatch
Matches if the value of the corresponding key is ''yes'', ''true'', ''1'' or ''on''.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
defaultValue
private java.lang.String
key
-
Constructor Summary
Constructors Constructor Description BooleanMatch(java.lang.String key, boolean defaultValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getKey()
int
hashCode()
boolean
match(Tagged osm)
Tests whether the tagged object matches this criterion.java.lang.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
-
key
private final java.lang.String key
-
defaultValue
private final boolean defaultValue
-
-
Constructor Detail
-
BooleanMatch
BooleanMatch(java.lang.String key, boolean defaultValue)
-
-
Method Detail
-
getKey
public java.lang.String getKey()
-
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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-