Class SearchCompiler.Xor
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.search.SearchCompiler.Match
-
- org.openstreetmap.josm.data.osm.search.SearchCompiler.AbstractBinaryMatch
-
- org.openstreetmap.josm.data.osm.search.SearchCompiler.Xor
-
- All Implemented Interfaces:
java.util.function.Predicate<OsmPrimitive>
- Enclosing class:
- SearchCompiler
public static class SearchCompiler.Xor extends SearchCompiler.AbstractBinaryMatch
Matches if the left OR the right expression match, but not both.
-
-
Field Summary
-
Fields inherited from class org.openstreetmap.josm.data.osm.search.SearchCompiler.AbstractBinaryMatch
lhs, rhs
-
-
Constructor Summary
Constructors Constructor Description Xor(SearchCompiler.Match lhs, SearchCompiler.Match rhs)
Constructs a newXor
match.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
match(OsmPrimitive osm)
Tests whether the primitive matches this criterion.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.AbstractBinaryMatch
equals, getLhs, getRhs, hashCode, map, parenthesis
-
Methods inherited from class org.openstreetmap.josm.data.osm.search.SearchCompiler.Match
test, validate
-
-
-
-
Constructor Detail
-
Xor
public Xor(SearchCompiler.Match lhs, SearchCompiler.Match rhs)
Constructs a newXor
match.- Parameters:
lhs
- left hand siderhs
- right hand side
-
-
Method Detail
-
match
public boolean match(OsmPrimitive osm)
Description copied from class:SearchCompiler.Match
Tests whether the primitive matches this criterion.- Specified by:
match
in classSearchCompiler.Match
- Parameters:
osm
- the primitive to test- Returns:
- true if the primitive matches this criterion
-
match
public boolean match(Tagged osm)
Description copied from class:SearchCompiler.Match
Tests whether the tagged object matches this criterion.- Overrides:
match
in classSearchCompiler.Match
- 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
-
-