Package com.meidusa.amoeba.parser.expression

Examples of com.meidusa.amoeba.parser.expression.Expression.evaluate()


  public Comparable evaluate(List<Expression> list,Object[] parameters) throws ParseException {
    if(list.size()==2){
      Expression e1 = list.get(0);
      Expression e2 = list.get(1);
      if(e1.canEvaluate() && e2.canEvaluate()){
        Comparable comparable = com.meidusa.amoeba.sqljep.function.Add.add(e1.evaluate(parameters),e2.evaluate(parameters));
        return comparable;
      }
    }
    return null;
  }
View Full Code Here


  public Comparable evaluate(List<Expression> list,Object[] parameters) throws ParseException {
    if(list.size()==2){
      Expression e1 = list.get(0);
      Expression e2 = list.get(1);
      if(e1.canEvaluate() && e2.canEvaluate()){
        Comparable comparable = com.meidusa.amoeba.sqljep.function.And.and(e1.evaluate(parameters),e2.evaluate(parameters));
        return comparable;
      }
    }
    return null;
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public Comparable evaluate(List<Expression> list, Object[] parameters)
      throws ParseException {
    Expression param1 = list.get(0);
    Expression param2 = list.get(1);
    return com.meidusa.amoeba.sqljep.function.Multiply.mul(param1.evaluate(parameters), param2.evaluate(parameters));
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.