## Class EvaluationResult

• java.lang.Object
• com.opengamma.strata.report.framework.expression.EvaluationResult

• public final class EvaluationResult
extends Object
The result of a TokenEvaluator evaluating an expression against an object.

The result contains the result of the evaluation and the remaining tokens in the expression.

• ### Method Summary

All Methods
Modifier and Type Method Description
static EvaluationResult failure​(String message, Object... messageValues)
Creates a result for an unsuccessful evaluation of an expression.
List<String> getRemainingTokens()
Returns the tokens remaining in the expression after evaluation.
Result<?> getResult()
Returns the result of evaluating the expression against the object.
boolean isComplete()
Returns true if evaluation of the whole expression is complete.
static EvaluationResult of​(Result<?> result, List<String> remainingTokens)
Creates the result of evaluating a token against an object.
static EvaluationResult success​(Object value, List<String> remainingTokens)
Creates the result of successfully evaluating a token against an object.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Method Detail

• #### success

public static EvaluationResult success​(Object value,
List<String> remainingTokens)
Creates the result of successfully evaluating a token against an object.
Parameters:
value - the result of evaluating the expression against the object
remainingTokens - the tokens remaining in the expression after evaluation
Returns:
the result of successfully evaluating a token against an object
• #### failure

public static EvaluationResult failure​(String message,
Object... messageValues)
Creates a result for an unsuccessful evaluation of an expression.
Parameters:
message - the error message
messageValues - values substituted into the error message. See Messages.format(String, Object...) for details
Returns:
the result of an unsuccessful evaluation of an expression
• #### of

public static EvaluationResult of​(Result<?> result,
List<String> remainingTokens)
Creates the result of evaluating a token against an object.
Parameters:
result - the result of evaluating the expression against the object
remainingTokens - the tokens remaining in the expression after evaluation
Returns:
the result of evaluating a token against an object
• #### getResult

public Result<?> getResult()
Returns the result of evaluating the expression against the object.
Returns:
the result of evaluating the expression against the object
• #### getRemainingTokens

public List<String> getRemainingTokens()
Returns the tokens remaining in the expression after evaluation.
Returns:
the tokens remaining in the expression after evaluation
• #### isComplete

public boolean isComplete()
Returns true if evaluation of the whole expression is complete.

This occurs if the evaluation failed or all tokens in the expression have been consumed.

Returns:
returns true if evaluation of the whole expression is complete