Class FormattedStringExpression
java.lang.Object
VASSAL.script.expression.Expression
VASSAL.script.expression.FormattedStringExpression
Report Format or old-style Formatted String expression containing at
least one $variable$ name reference
-
Field Summary
Fields inherited from class Expression
CACHEModifier and TypeFieldDescriptionprotected static final Map<org.apache.commons.lang3.tuple.Pair<Object, Class<? extends Expression>>, Expression> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate(PropertySource ps, Map<String, String> properties, boolean localized) Deprecated.evaluate(PropertySource ps, Map<String, String> properties, boolean localized, Auditable owner, AuditTrail audit) Each subclass must implement evaluate() to evaluate itself The default implementation just returns the expression itself, which works correctly for simple Expression types like NullExpression and IntExpression.static ExpressionConvert to a BeanShell expressionMethods inherited from class Expression
createExpression, createPropertyExpression, createSimplePropertyExpression, equals, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, getExpression, getFilter, getFilter, getFilter, getFilter, handleError, hashCode, quietEvaluate, quietEvaluate, reset, resetCachedExpressions, setExpression, tryEvaluate, tryEvaluate, tryEvaluate, tryEvaluate, tryEvaluate, tryEvaluate, tryEvaluate, tryEvaluate, tryEvaluate, tryEvaluate, tryEvaluateModifier and TypeMethodDescriptionstatic ExpressionFactory method to create an appropriate expression based on the supplied String.static ExpressionFactory method to create a new Property Match Expression.static ExpressionFactory method to create a Beanshell expression of a value that is known to be a property name.booleanevaluate()Deprecated.evaluate(boolean localized) Deprecated.evaluate(PropertySource ps, boolean localized) evaluate(PropertySource ps, boolean localized, Auditable owner, AuditTrail audit) evaluate(PropertySource ps, Auditable owner, AuditTrail audit) evaluate(Auditable owner, AuditTrail audit) Deprecated.Deprecated.getFilter(PropertySource ps, Auditable owner, AuditTrail audit) Return a PieceFilter using the expression.getFilter(Auditable owner, AuditTrail audit) protected voidinthashCode()quietEvaluate(PropertySource ps, Map<String, String> properties, boolean localized, Auditable owner, AuditTrail audit) A version of tryEvaluate the supresses error messages.quietEvaluate(PropertySource ps, Auditable owner, String fieldKey) protected voidreset()static voidvoidDeprecated.tryEvaluate(boolean localized) Deprecated.tryEvaluate(boolean localized, Auditable owner, AuditTrail audit) Evaluate an expression with data warning support built inDeprecated.tryEvaluate(PropertySource ps, boolean localized) tryEvaluate(PropertySource ps, boolean localized, Auditable owner, AuditTrail audit) Evaluate an expression with data warning support built intryEvaluate(PropertySource ps, Map<String, String> properties, boolean localized) tryEvaluate(PropertySource ps, Map<String, String> properties, boolean localized, Auditable owner, AuditTrail audit) Core tryEvaluate implementation.tryEvaluate(PropertySource ps, Auditable owner, String fieldKey) tryEvaluate(PropertySource ps, Auditable owner, AuditTrail audit) Evaluate an expression with data warning support built intryEvaluate(Auditable owner, AuditTrail audit) Evaluate an expression with data warning support built in
-
Constructor Details
-
FormattedStringExpression
-
-
Method Details
-
evaluate
@Deprecated(since="2021-06-11") public String evaluate(PropertySource ps, Map<String, String> properties, boolean localized) Deprecated.Evaluate this expression. NB. Code moved from FormattedString.java- Overrides:
evaluatein classExpression
-
evaluate
public String evaluate(PropertySource ps, Map<String, String> properties, boolean localized, Auditable owner, AuditTrail audit) Description copied from class:ExpressionEach subclass must implement evaluate() to evaluate itself The default implementation just returns the expression itself, which works correctly for simple Expression types like NullExpression and IntExpression.- Overrides:
evaluatein classExpression- Parameters:
ps- Property Source providing property valuesproperties- default property valueslocalized- localize property calls?audit- Audit trail to record expression evaluation info in- Returns:
- evaluated String.
-
toBeanShellString
Convert to a BeanShell expression- Overrides:
toBeanShellStringin classExpression- Returns:
- BeanShell equivalent
-
instance
-
evaluate(PropertySource, Map, boolean, Auditable, AuditTrail)