Class SearchCompiler.And
- 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.And
-
- All Implemented Interfaces:
java.util.function.Predicate<OsmPrimitive>
- Enclosing class:
- SearchCompiler
public static class SearchCompiler.And extends SearchCompiler.AbstractBinaryMatch
Matches if both left and right expressions match.
-
-
Field Summary
-
Fields inherited from class org.openstreetmap.josm.data.osm.search.SearchCompiler.AbstractBinaryMatch
lhs, rhs
-
-
Constructor Summary
Constructors Constructor Description And(SearchCompiler.Match lhs, SearchCompiler.Match rhs)
Constructs a newAnd
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
-
And
public And(SearchCompiler.Match lhs, SearchCompiler.Match rhs)
Constructs a newAnd
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
-
-