Ignore:
Timestamp:
2017-10-16T13:26:41+02:00 (8 years ago)
Author:
bastiK
Message:

see #14794 - add missing top level javadoc; minor refactoring for Condition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEngineDataProvider.java

    r12656 r13003  
    66import org.openstreetmap.josm.data.osm.search.SearchCompiler.Match;
    77
     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 */
    813public 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     */
    918    Collection<String> getTemplateKeys();
    1019
    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);
    1228
     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     */
    1334    boolean evaluateCondition(Match condition);
    1435}
Note: See TracChangeset for help on using the changeset viewer.