Class SearchCompiler.ValueComparison
- 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.ValueComparison
-
- All Implemented Interfaces:
Predicate<OsmPrimitive>
- Enclosing class:
- SearchCompiler
public static class SearchCompiler.ValueComparison extends SearchCompiler.TaggedMatch
-
-
Field Summary
Fields Modifier and Type Field Description private int
compareMode
private static Pattern
ISO8601
private String
key
private Double
referenceNumber
private String
referenceValue
-
Constructor Summary
Constructors Constructor Description ValueComparison(String key, String referenceValue, int compareMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
hashCode()
boolean
match(Tagged osm)
Tests whether the tagged object matches this criterion.String
toString()
SearchCompiler.Match
validate()
Check if this is a valid match object-
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
-
-
-
-
Field Detail
-
referenceValue
private final String referenceValue
-
referenceNumber
private final Double referenceNumber
-
compareMode
private final int compareMode
-
-
Constructor Detail
-
ValueComparison
public ValueComparison(String key, String referenceValue, int compareMode)
-
-
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
-
validate
public SearchCompiler.Match validate() throws SearchParseError
Description copied from class:SearchCompiler.Match
Check if this is a valid match object- Overrides:
validate
in classSearchCompiler.Match
- Returns:
this
, for easy chaining- Throws:
SearchParseError
- If the match is not valid
-
-