Class MapTokenEvaluator


  • public class MapTokenEvaluator
    extends TokenEvaluator<java.util.Map<?,​?>>
    Evaluates a token against a map.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EvaluationResult evaluate​(java.util.Map<?,​?> map, CalculationFunctions functions, java.lang.String firstToken, java.util.List<java.lang.String> remainingTokens)
      Evaluates a token against a given object.
      java.lang.Class<?> getTargetType()
      Gets the type against which tokens can be evaluated in this implementation.
      java.util.Set<java.lang.String> tokens​(java.util.Map<?,​?> map)
      Gets the set of supported token for the given object.
      • Methods inherited from class java.lang.Object

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

      • MapTokenEvaluator

        public MapTokenEvaluator()
    • Method Detail

      • getTargetType

        public java.lang.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<java.util.Map<?,​?>>
        Returns:
        the evaluation type
      • tokens

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

        public EvaluationResult evaluate​(java.util.Map<?,​?> map,
                                         CalculationFunctions functions,
                                         java.lang.String firstToken,
                                         java.util.List<java.lang.String> remainingTokens)
        Description copied from class: TokenEvaluator
        Evaluates a token against a given object.
        Specified by:
        evaluate in class TokenEvaluator<java.util.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