Changeset 13003 in josm for trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEngineDataProvider.java
- Timestamp:
- 2017-10-16T13:26:41+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEngineDataProvider.java
r12656 r13003 6 6 import org.openstreetmap.josm.data.osm.search.SearchCompiler.Match; 7 7 8 /** 9 * Interface for objects that can be used with a template to generate a string. 10 * <p> 11 * Provides the necessary information for the template to be applied. 12 */ 8 13 public interface TemplateEngineDataProvider { 14 /** 15 * Get the collection of all keys that can be mapped to values. 16 * @return all keys that can be mapped to values 17 */ 9 18 Collection<String> getTemplateKeys(); 10 19 11 Object getTemplateValue(String name, boolean special); 20 /** 21 * Map a key to a value given the properties of the object. 22 * @param key the key to map 23 * @param special if the key is a "special:*" keyword that is used 24 * to get certain information or automated behavior 25 * @return a value that the key is mapped to or "special" information in case {@code special} is true 26 */ 27 Object getTemplateValue(String key, boolean special); 12 28 29 /** 30 * Check if a condition holds for the object represented by this {@link TemplateEngineDataProvider}. 31 * @param condition the condition to check (which is a search expression) 32 * @return true if the condition holds 33 */ 13 34 boolean evaluateCondition(Match condition); 14 35 }
Note:
See TracChangeset
for help on using the changeset viewer.
