001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.gui.mappaint.mapcss;
003
004import org.openstreetmap.josm.gui.mappaint.Environment;
005
006/**
007 * A MapCSS Expression.
008 *
009 * Can be evaluated in a certain {@link Environment}. Usually takes
010 * parameters, that are also Expressions and have to be evaluated first.
011 * @since  3848 (creation)
012 * @since 10600 (functional interface)
013 */
014@FunctionalInterface
015public interface Expression {
016    /**
017     * Evaluate this expression.
018     * @param env The environment
019     * @return the result of the evaluation, can be a {@link java.util.List}, String or any
020     * primitive type or wrapper classes of a primitive type.
021     */
022    Object evaluate(Environment env);
023}