Class ExpressionFactory
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.mapcss.ExpressionFactory
-
public final class ExpressionFactory extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExpressionFactory.AndOperator"And" logical operator.static classExpressionFactory.CondOperatorConditional operator.(package private) static interfaceExpressionFactory.Factorystatic classExpressionFactory.IsInsideFunctionFunctions#insideimplementation for use inMapCSSTagCheckerstatic classExpressionFactory.LengthFunctionFunction to calculate the length of a string or list in a MapCSS eval expression.static classExpressionFactory.MinMaxFunctionComputes the maximum/minimum value an arbitrary number of floats, or a list of floats.(package private) static interfaceExpressionFactory.NullableArgumentsMarks functions which should be executed also when one or more arguments are null.static classExpressionFactory.NullExpressionExpression that always evaluates to null.static classExpressionFactory.OrOperator"Or" logical operator.static interfaceExpressionFactory.QuadFunction<T,U,V,W,R>Represents a function that accepts four arguments and produces a result.static interfaceExpressionFactory.TriFunction<T,U,V,R>Represents a function that accepts three arguments and produces a result.
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.util.Map<java.lang.String,ExpressionFactory.Factory>FACTORY_MAP
-
Constructor Summary
Constructors Modifier Constructor Description privateExpressionFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExpressioncreateFunctionExpression(java.lang.String name, java.util.List<Expression> args)Main method to create an function-like expression.private static voidinitFactories()
-
-
-
Field Detail
-
FACTORY_MAP
static final java.util.Map<java.lang.String,ExpressionFactory.Factory> FACTORY_MAP
-
-
Constructor Detail
-
ExpressionFactory
private ExpressionFactory()
-
-
Method Detail
-
initFactories
private static void initFactories()
-
createFunctionExpression
public static Expression createFunctionExpression(java.lang.String name, java.util.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.
-
-