Class SearchCompiler.AbstractBinaryMatch
java.lang.Object
org.openstreetmap.josm.data.osm.search.SearchCompiler.Match
org.openstreetmap.josm.data.osm.search.SearchCompiler.AbstractBinaryMatch
- All Implemented Interfaces:
Predicate<OsmPrimitive>
- Direct Known Subclasses:
SearchCompiler.And,SearchCompiler.Or,SearchCompiler.Xor
- Enclosing class:
- SearchCompiler
A binary search operator which may take data parameters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SearchCompiler.Matchprotected final SearchCompiler.Match -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a newBinaryMatch. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal SearchCompiler.MatchgetLhs()Returns left hand side.final SearchCompiler.MatchgetRhs()Returns right hand side.inthashCode()<T,U> U map(Function<SearchCompiler.Match, T> mapper, BiFunction<T, T, U> operator) First appliesmapperto both sides and then appliesoperatoron the two results.protected static StringMethods inherited from class org.openstreetmap.josm.data.osm.search.SearchCompiler.Match
match, match, test, validate
-
Field Details
-
lhs
-
rhs
-
-
Constructor Details
-
AbstractBinaryMatch
Constructs a newBinaryMatch.- Parameters:
lhs- Left hand siderhs- Right hand side
-
-
Method Details
-
getLhs
Returns left hand side.- Returns:
- left hand side
-
getRhs
Returns right hand side.- Returns:
- right hand side
-
map
First appliesmapperto both sides and then appliesoperatoron the two results.- Type Parameters:
T- the type of the intermediate resultU- the type of the result- Parameters:
mapper- the mapping functionoperator- the operator- Returns:
operator.apply(mapper.apply(lhs), mapper.apply(rhs))
-
parenthesis
-
hashCode
-
equals
-