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
Match a primitive based off of a value comparison. This currently supports:
- ISO8601 dates (YYYY-MM-DD)
- Numbers
- Alpha-numeric comparison
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionValueComparison(String key, String referenceValue, int compareMode) Create a newSearchCompiler.ValueComparisonobject -
Method Summary
Methods inherited from class org.openstreetmap.josm.data.osm.search.SearchCompiler.TaggedMatch
compilePattern, matchMethods inherited from class org.openstreetmap.josm.data.osm.search.SearchCompiler.Match
test
-
Field Details
-
key
-
referenceValue
-
referenceNumber
-
compareMode
-
ISO8601
-
-
Constructor Details
-
ValueComparison
Create a newSearchCompiler.ValueComparisonobject- Parameters:
key- The key to get the value fromreferenceValue- The value to compare tocompareMode- The compare mode to use;< 0iscurrentValue < referenceValueand> 0iscurrentValue > referenceValue.0is effectively an equality check.
-
-
Method Details
-
match
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
-
hashCode
-
equals
-
validate
Description copied from class:SearchCompiler.MatchCheck if this is a valid match object- Overrides:
validatein classSearchCompiler.Match- Returns:
this, for easy chaining- Throws:
SearchParseError- If the match is not valid
-