Class ExpressionFactory.MinMaxFunction
java.lang.Object
org.openstreetmap.josm.gui.mappaint.mapcss.ExpressionFactory.MinMaxFunction
- All Implemented Interfaces:
Expression
- Enclosing class:
- ExpressionFactory
Computes the maximum/minimum value an arbitrary number of floats, or a list of floats.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMinMaxFunction(List<Expression> args, boolean computeMax) Constructs a newMinMaxFunction. -
Method Summary
Modifier and TypeMethodDescriptionaggregateList(List<?> lst) Compute the minimum / maximum over the listevaluate(Environment env) Evaluate this expression.
-
Field Details
-
args
-
computeMax
-
-
Constructor Details
-
MinMaxFunction
Constructs a newMinMaxFunction.- Parameters:
args- argumentscomputeMax- iftrue, compute max. Iffalse, compute min
-
-
Method Details
-
aggregateList
Compute the minimum / maximum over the list- Parameters:
lst- The list- Returns:
- The minimum or maximum depending on
computeMax
-
evaluate
Description copied from interface:ExpressionEvaluate this expression.- Specified by:
evaluatein interfaceExpression- Parameters:
env- The environment- Returns:
- the result of the evaluation, can be a
List, String or any primitive type or wrapper classes of a primitive type.
-