Examples of Evaluator


Examples of br.com.caelum.vraptor.eval.Evaluator

  }

  public String fillUri(Object params) {
    String base = originalPattern.replaceAll("\\.\\*", "");
    for (String key : parameters) {
      Object result = new Evaluator().get(params, key);
      base = base.replaceAll("\\{" + key + "\\*?\\}", result == null ? "" : result.toString());
    }
    return base;
  }
View Full Code Here

Examples of ch.idsia.tools.Evaluator

        options.setMaxFPS(true);
        options.setLevelDifficulty(level);
        options.setPauseWorld(false);
        agent.reset();
        options.setAgent(agent);
        Evaluator evaluator = new Evaluator (options);
        EvaluationInfo result = evaluator.evaluate().get(0);
       // System.out.print(".");
        double score = result.computeDistancePassed();
         System.out.println("score: " +score);
        return score;
    }
View Full Code Here

Examples of com.CompPad.model.Evaluator

        Shell shell = new Shell();
        String fs[] = {"x := 1","x ="};
        shell.evaluate(fs);
    }
    public Shell() throws Exception {
        evaluator = new Evaluator();

        /* Create one expression which will be used to evaluate formulas */

        shellExpression = new Expression2("", outputListener);
        shellExpression.addListener(errorListener);
View Full Code Here

Examples of com.codingcrayons.aspectfaces.evaluation.Evaluator

    }

    EvaluableJoinPoint evaluable = AnnotationContainer.getInstance().getEvaluableAnnotation(provider.getName());
    if (evaluable != null && this.context.getConfiguration().getEvaluatorClassName() != null) {

      Evaluator evaluator;
      try {
        evaluator = (Evaluator) Class.forName(context.getConfiguration().getEvaluatorClassName()).newInstance();
      } catch (InstantiationException e) {
        throw new EvaluatorException("Evaluator " + context.getConfiguration().getEvaluatorClassName()
          + "can not be instantiated", e);
      } catch (IllegalAccessException e) {
        throw new EvaluatorException("Evaluator " + context.getConfiguration().getEvaluatorClassName()
          + "can not be instantiated", e);
      } catch (ClassNotFoundException e) {
        throw new EvaluatorException("Evaluator class " + context.getConfiguration().getEvaluatorClassName()
          + " not found", e);
      }

      if (!evaluator.evaluate(evaluable.getEvaluableValue(provider))) {
        this.metaProperty.setApplicable(false);
      }
    }
  }
View Full Code Here

Examples of com.google.sitebricks.Evaluator

//    @Test(dataProvider = EXPRS_AND_OBJECTS)
    public final void repeatNumberOfTimesWithVars(String expression, Object page, int should, final String exp) throws ExpressionCompileException {
        OptimizerFactory.setDefaultOptimizer(OptimizerFactory.SAFE_REFLECTIVE);
        final int[] times = new int[1];
        final Evaluator evaluator = new DynTypedMvelEvaluatorCompiler(null).compile(exp);
        final WidgetChain mockChain = new ProceedingWidgetChain() {
            @Override
            public void render(final Object bound, Respond respond) {
                times[0]++;

                final Object thing = evaluator.evaluate(exp, bound);
                assert thing instanceof Thing : "Contextual (current) var not set: " + thing;
                assert A_NAME.equals(((Thing)thing).getName());
            }
        };
View Full Code Here

Examples of com.mysema.codegen.Evaluator

    @SuppressWarnings("unchecked")
    @Test
    public void test() {
        DefaultEvaluatorFactory evaluatorFactory = new DefaultEvaluatorFactory(CollQueryTemplates.DEFAULT);
        QCat cat = QCat.cat;
        Evaluator projectionEvaluator = evaluatorFactory.create(metadata, Collections.singletonList(cat), cat.name);
        EvaluatorFunction transformer = new EvaluatorFunction(projectionEvaluator);

        Cat c = new Cat("Kitty");
        assertEquals("Kitty", transformer.apply(c));
    }
View Full Code Here

Examples of com.opengamma.financial.expression.UserExpression.Evaluator

  };

  @Override
  public boolean acceptPosition(final Position position) {
    final Evaluator eval = getExpression().evaluator();
    eval.setVariable("position", position);
    eval.setVariable("quantity", position.getQuantity().doubleValue());
    eval.setVariable("security", position.getSecurity());
    eval.setDynamicVariables(new DynamicVariables() {
      @Override
      public Object getValue(final String name) {
        return s_dynamicAttributes.getValue(position, name);
      }
    });
    eval.setDynamicAttributes(s_dynamicAttributes);
    return Boolean.TRUE.equals(eval.evaluate());
  }
View Full Code Here

Examples of gov.nasa.arc.mct.evaluator.api.Evaluator

      addEvaluator(parent);
   
  }
 
  private void addEvaluator(AbstractComponent comp) {
    Evaluator evaluator = comp.getCapability(Evaluator.class);
    if (evaluator == null) return;
   
    // Can only handle enum & imars/enum ...
    String language = evaluator.getLanguage();   
    if (!(language.equals("enum") || language.equals("imars/enum"))) {
      return;
    }
   
    // Track possible enumerations
    List<String> enumerations = new ArrayList<String> ();   
    StringTokenizer codes = new StringTokenizer(evaluator.getCode(), "\t");
   
    while (codes.hasMoreTokens()) {
      String code = codes.nextToken();
      int skip = 0;
      if (language.equals("enum")) skip = 2; // Skip first two terms
View Full Code Here

Examples of javarepl.Evaluator

    private CompletionResult completing(String expression) {
        return new ConsoleCompleter(evaluator, typeResolver).apply(expression);
    }

    private void givenConsoleThatExecuted(String... expressions) {
        evaluator = new Evaluator();

        for (String expression : expressions) {
            evaluator.evaluate(expression);
        }
    }
View Full Code Here

Examples of kodkod.engine.Evaluator

        kEnumerator = old.kEnumerator;
        k2pos = old.k2pos;
        rel2type = old.rel2type;
        decl2type = old.decl2type;
        if (inst!=null) {
           eval = new Evaluator(inst, old.solver.options());
           a2k = new LinkedHashMap<Expr,Expression>();
           for(Map.Entry<Expr,Expression> e: old.a2k.entrySet())
             if (e.getKey() instanceof Sig || e.getKey() instanceof Field)
                a2k.put(e.getKey(), e.getValue());
           UniqueNameGenerator un = new UniqueNameGenerator();
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.