Class SearchExpressionCondition
java.lang.Object
org.openstreetmap.josm.tools.template_engine.SearchExpressionCondition
- All Implemented Interfaces:
TemplateEntry
Conditional
TemplateEntry that executes another template in case a search expression applies
to the given data provider.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSearchExpressionCondition(SearchCompiler.Match condition, TemplateEntry text) Creates a newSearchExpressionCondition. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendText(StringBuilder result, TemplateEngineDataProvider dataProvider) Execute this template by generating text for a given data provider.booleaninthashCode()booleanisValid(TemplateEngineDataProvider dataProvider) Check if this template is applicable to the given data provider.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.tools.template_engine.TemplateEntry
getText
-
Field Details
-
condition
-
text
-
-
Constructor Details
-
SearchExpressionCondition
Creates a newSearchExpressionCondition.- Parameters:
condition- the match condition that is checked before applying the child templatetext- the child template to execute in case the condition is fulfilled
-
-
Method Details
-
appendText
Description copied from interface:TemplateEntryExecute this template by generating text for a given data provider.- Specified by:
appendTextin interfaceTemplateEntry- Parameters:
result- theStringBuilderto append the text todataProvider- the data provider from which information should be compiled to a string
-
isValid
Description copied from interface:TemplateEntryCheck if this template is applicable to the given data provider.- Specified by:
isValidin interfaceTemplateEntry- Parameters:
dataProvider- the data provider to check- Returns:
- true if all conditions are fulfilled to apply the template (for instance all required key=value mappings are present), false otherwise
-
toString
-
hashCode
-
equals
-