Examples of evaluate()


Examples of gov.nist.scap.cpe.language.eval.CPEEvaluatorImpl.evaluate()

          results);
      for (Platform<?> platform : platformSpecification.getPlatforms()) {
        String platformId = platform.getId();
        CPEEvaluator.Result result;
        try {
          result = evaluator.evaluate(platform);
        } catch (CPELanguageEvaluationException e) {
          log.error("unable to evaluate platform: " + platformId, e);
          result = CPEEvaluator.Result.ERROR;
        }
        cpeLanguageToStatusMap.put(platformId, result);

Examples of grails.validation.ConstraintsEvaluator.evaluate()

    private void initializeConstraints() {
        // process the constraints
        final ConstraintsEvaluator constraintsEvaluator = getConstraintsEvaluator();
        if(constraintsEvaluator != null) {
            constraints = constraintsEvaluator.evaluate(getClazz(), persistentProperties);
        }
        else {
            constraints = Collections.emptyMap();
        }
    }

Examples of groovy.lang.GroovyShell.evaluate()

            try {
                GroovyShell shell = new GroovyShell( binding );
                File groovyScript = Http.translatePath( groovyDir, request.getUrl() );
                if( groovyScript.exists() ) {
                    shell.evaluate( groovyScript.getAbsolutePath() );
                } else {
                    response.sendError( HttpURLConnection.HTTP_NOT_FOUND, request.getUrl() + " not found.");
                }
            } catch (ClassNotFoundException e) {
                log.log( Level.SEVERE, e.getMessage(), e );

Examples of groovy.lang.Script.evaluate()

        GroovyShell shell = cl != null ? new GroovyShell(cl) : new GroovyShell();

        // need to re-parse script due thread-safe with binding
        Script script = shell.parse(text);
        configure(exchange, script.getBinding());
        Object value = script.evaluate(text);

        return exchange.getContext().getTypeConverter().convertTo(type, value);
    }

    private void configure(Exchange exchange, final Binding binding) {

Examples of hivemall.knn.distance.PopcountUDF.evaluate()

        String a1 = bbminhash.evaluate(Arrays.asList("a", "b", "c"), false).toString();
        String a2 = bbminhash.evaluate(Arrays.asList("a", "b"), false).toString();
        Assert.assertFalse("a1: " + a1, bigint(a1).compareTo(bigint(0L)) < 0);
        Assert.assertFalse("a2: " + a2, bigint(a2).compareTo(bigint(0L)) < 0);
        Assert.assertTrue(popcnt.evaluate(a1, a2).get() > 0);

        String b1 = bbminhash.evaluate(Arrays.asList("a"), false).toString();
        String b2 = bbminhash.evaluate(Arrays.asList("b", "c"), false).toString();
        Assert.assertFalse("b1: " + b1, bigint(b1).compareTo(bigint(0L)) < 0);
        Assert.assertFalse("b2: " + b2, bigint(b2).compareTo(bigint(0L)) < 0);

Examples of hivemall.knn.lsh.MinHashesUDF.evaluate()

    @Test
    public void testEvaluate() throws HiveException {
        MinHashesUDF minhash = new MinHashesUDF();

        Assert.assertEquals(5, minhash.evaluate(Arrays.asList(1, 2, 3, 4)).size());
        Assert.assertEquals(9, minhash.evaluate(Arrays.asList(1, 2, 3, 4), 9, 2).size());

        Assert.assertEquals(minhash.evaluate(Arrays.asList(1, 2, 3, 4)), minhash.evaluate(Arrays.asList(1, 2, 3, 4), 5, 2));

        Assert.assertEquals(minhash.evaluate(Arrays.asList(1, 2, 3, 4)), minhash.evaluate(Arrays.asList("1", "2", "3", "4"), true));

Examples of httl.Template.evaluate()

        if (macro == null && importMacros != null) {
          macro = importMacros.get(name);
        }
      }
      if (macro != null) {
        result = macro.evaluate(args);
      } else {
        throw new ParseException("No such macro \"" + filteredName + "\" or import method " + ClassUtils.getMethodFullName(filteredName, types) + ".", node.getOffset());
      }
    }
    parameterStack.push(result);

Examples of hudson.plugins.emailext.plugins.content.FailedTestsContent.evaluate()

        });
        TaskListener listener = StreamTaskListener.fromStdout();
        project.scheduleBuild2(0).get();
        FailedTestsContent failedTestsContent = new FailedTestsContent();
        failedTestsContent.onlyRegressions = true;
        String content = failedTestsContent.evaluate(project.getLastBuild(), listener, FailedTestsContent.MACRO_NAME);
        assertTrue("The failing test should be reported the first time it fails", content.contains("hudson.plugins.emailext"));

        project.scheduleBuild2(0).get();
        content = failedTestsContent.evaluate(project.getLastBuild(), listener, FailedTestsContent.MACRO_NAME);
        assertFalse("The failing test should not be reported the second time it fails", content.contains("hudson.plugins.emailext"));

Examples of hudson.plugins.emailext.plugins.content.JellyScriptContent.evaluate()

        try {
            AbstractBuild<?,?> build = project.getBuild(buildId);
            if(templateFile.endsWith(".jelly")) {
                JellyScriptContent jellyContent = new JellyScriptContent();
                jellyContent.template = templateFile;
                result = jellyContent.evaluate(build, TaskListener.NULL, "JELLY_SCRIPT");
            } else {
                ScriptContent scriptContent = new ScriptContent();
                scriptContent.template = templateFile;               
                result = scriptContent.evaluate(build, TaskListener.NULL, "SCRIPT");
            }

Examples of hudson.plugins.emailext.plugins.content.ScriptContent.evaluate()

                jellyContent.template = templateFile;
                result = jellyContent.evaluate(build, TaskListener.NULL, "JELLY_SCRIPT");
            } else {
                ScriptContent scriptContent = new ScriptContent();
                scriptContent.template = templateFile;               
                result = scriptContent.evaluate(build, TaskListener.NULL, "SCRIPT");
            }
        } catch (Exception ex) {
            result = renderError(ex);
        }
       
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.