Class MapTokenEvaluator


  • public class MapTokenEvaluator
    extends TokenEvaluator<Map<?,​?>>
    Evaluates a token against a map.
    • Constructor Detail

      • MapTokenEvaluator

        public MapTokenEvaluator()
    • Method Detail

      • getTargetType

        public Class<?> getTargetType()
        Description copied from class: TokenEvaluator
        Gets the type against which tokens can be evaluated in this implementation.
        Specified by:
        getTargetType in class TokenEvaluator<Map<?,​?>>
        Returns:
        the evaluation type
      • tokens

        public Set<String> tokens​(Map<?,​?> map)
        Description copied from class: TokenEvaluator
        Gets the set of supported token for the given object.
        Specified by:
        tokens in class TokenEvaluator<Map<?,​?>>
        Parameters:
        map - the object against which tokens may be evaluated
        Returns:
        the set of supported tokens
      • evaluate

        public EvaluationResult evaluate​(Map<?,​?> map,
                                         CalculationFunctions functions,
                                         String firstToken,
                                         List<String> remainingTokens)
        Description copied from class: TokenEvaluator
        Evaluates a token against a given object.
        Specified by:
        evaluate in class TokenEvaluator<Map<?,​?>>
        Parameters:
        map - the object against which to evaluate the token
        functions - the calculation functions
        firstToken - the first token of the expression
        remainingTokens - the remaining tokens in the expression, possibly empty
        Returns:
        the result of the evaluation