Class ExpressionFactory.MinMaxFunction

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<Expression> args  
      private boolean computeMax  
    • Constructor Summary

      Constructors 
      Constructor Description
      MinMaxFunction​(java.util.List<Expression> args, boolean computeMax)
      Constructs a new MinMaxFunction.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Float aggregateList​(java.util.List<?> lst)
      Compute the minimum / maximum over the list
      java.lang.Object evaluate​(Environment env)
      Evaluate this expression.
      • Methods inherited from class java.lang.Object

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

      • MinMaxFunction

        public MinMaxFunction​(java.util.List<Expression> args,
                              boolean computeMax)
        Constructs a new MinMaxFunction.
        Parameters:
        args - arguments
        computeMax - if true, compute max. If false, compute min
    • Method Detail

      • aggregateList

        public java.lang.Float aggregateList​(java.util.List<?> lst)
        Compute the minimum / maximum over the list
        Parameters:
        lst - The list
        Returns:
        The minimum or maximum depending on computeMax
      • evaluate

        public java.lang.Object evaluate​(Environment env)
        Description copied from interface: Expression
        Evaluate this expression.
        Specified by:
        evaluate in interface Expression
        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.