Class ExpressionFactory
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.mapcss.ExpressionFactory
-
public final class ExpressionFactory extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExpressionFactory.AndOperator
"And" logical operator.static class
ExpressionFactory.CondOperator
Conditional operator.(package private) static interface
ExpressionFactory.Factory
static class
ExpressionFactory.IsInsideFunction
Functions#inside
implementation for use inMapCSSTagChecker
static class
ExpressionFactory.LengthFunction
Function to calculate the length of a string or list in a MapCSS eval expression.static class
ExpressionFactory.MinMaxFunction
Computes the maximum/minimum value an arbitrary number of floats, or a list of floats.(package private) static interface
ExpressionFactory.NullableArguments
Marks functions which should be executed also when one or more arguments are null.static class
ExpressionFactory.NullExpression
Expression that always evaluates to null.static class
ExpressionFactory.OrOperator
"Or" logical operator.static interface
ExpressionFactory.QuadFunction<T,U,V,W,R>
static interface
ExpressionFactory.TriFunction<T,U,V,R>
-
Field Summary
Fields Modifier and Type Field Description (package private) static Map<String,ExpressionFactory.Factory>
FACTORY_MAP
-
Constructor Summary
Constructors Modifier Constructor Description private
ExpressionFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Expression
createFunctionExpression(String name, List<Expression> args)
Main method to create an function-like expression.private static void
initFactories()
-
-
-
Field Detail
-
FACTORY_MAP
static final Map<String,ExpressionFactory.Factory> FACTORY_MAP
-
-
Constructor Detail
-
ExpressionFactory
private ExpressionFactory()
-
-
Method Detail
-
initFactories
private static void initFactories()
-
createFunctionExpression
public static Expression createFunctionExpression(String name, List<Expression> args)
Main method to create an function-like expression.- Parameters:
name
- the name of the function or operatorargs
- the list of arguments (as expressions)- Returns:
- the generated Expression. If no suitable function can be found,
returns
ExpressionFactory.NullExpression.INSTANCE
.
-
-