Examples of eval()


Examples of org.apache.tajo.engine.function.builtin.AvgLong.eval()

    }

    AvgLong avg = new AvgLong();
    FunctionContext ctx = avg.newContext();
    for (int i = 1; i <= 5; i++) {
      avg.eval(ctx, tuples[i-1]);
    }

    assertTrue(15 / 5 == avg.terminate(ctx).asFloat8());

View Full Code Here

Examples of org.apache.tajo.engine.function.builtin.Date.eval()

  @Test
  public void testDate() {
    Date date = new Date();
    Tuple tuple = new VTuple(new Datum[] {new TextDatum("25/12/2012 00:00:00")});
    Int8Datum unixtime = (Int8Datum) date.eval(tuple);
    Calendar c = Calendar.getInstance();
    c.setTimeInMillis(unixtime.asInt8());
    assertEquals(2012, c.get(Calendar.YEAR));
    assertEquals(11, c.get(Calendar.MONTH));
    assertEquals(25, c.get(Calendar.DAY_OF_MONTH));
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.UpToDate.eval()

    super.execute();
    UpToDate u = new UpToDate();
    u.setProject(getProject());
    u.addSrcfiles(fileset);
    u.setTargetFile(destFile);
    if (u.eval()) {
        return;
    }

    //then the speedo part
    //1- sequence (if any)
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.condition.Condition.eval()

            checkEveryMillis *= checkEveryMultiplier;
            long start = System.currentTimeMillis();
            long end = start + maxWaitMillis;

            while (System.currentTimeMillis() < end) {
                if (c.eval()) {
                    processSuccess();
                    return;
                }
                try {
                    Thread.sleep(checkEveryMillis);
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.condition.FilesMatch.eval()

            File f = (File)i.next();
            match.setFile1( f );
            File f2 = new File( multi, f.getName() );
            match.setFile2( f2 );
            assertTrue("Assert file '" + f.getPath() + "' and file '" +
                    f2.getPath() + "'", match.eval() );
        }
    }

    public void addCleanup( File file ) {
        cleanUpList.add( file );
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.condition.Socket.eval()

        Socket socket = new Socket();

        socket.setServer("localhost");
        for(int i = 60 * 1024; i < 65000; i++) {
            socket.setPort(i);
            if(!socket.eval()) {
                return i;
            }
        }

        throw new BuildException("Failed to locate a free port off which to launch StandAloneBootStrapper.");
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.python.PythonEval.eval()

        for(final ComponentReference r: component.getReferences()) {
            final PythonEval pe = pxFactory.createProxy(PythonEval.class, (RuntimeEndpointReference)r.getEndpointReferences().get(0));
            px.add(Py.java2py(new PythonEval() {
                @Override
                public String eval(final String args) throws Exception {
                    final String v = pe.eval(args);
                    return v;
                }
            }));
        }
        final List<PyObject> pr = new ArrayList<PyObject>();
View Full Code Here

Examples of org.apache.velocity.tools.view.tools.ViewRenderTool.eval()

   
    public String getTitle() throws Exception {
        if(title.startsWith("$text.")) {
            ViewRenderTool render=new ViewRenderTool();
            render.setVelocityEngine(VelocityUtil.getEngine());
            return render.eval(title);
        }
        else {
            return title;
        }
    }
View Full Code Here

Examples of org.apache.xml.security.utils.CachedXPathFuncHereAPI.eval()

            if (currentNode.getClass().getName().equals(
               "org.apache.xml.dtm.ref.dom2dtm.DOM2DTM$defaultNamespaceDeclarationNode")) {
               continue;
            }
            */
            XObject includeInResult = xPathFuncHereAPI.eval(currentNode,
                                         xpathnode, prefixResolver);

            if (includeInResult.bool()) {
               resultNodes.add(currentNode);
               // log.debug("    Added " + org.apache.xml.security.c14n.implementations.Canonicalizer20010315.getXPath(currentNode));
View Full Code Here

Examples of org.apache.xpath.CachedXPathAPI.eval()

            //eval() is a better way to determine the boolean value of the exp.
            //For compliance with legacy behavior where selecting an empty node returns true,
            //selectNodeIterator is attempted in case of a failure.

            CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
            XObject result = cachedXPathAPI.eval(doc, xpath);
            if (result.bool())
              return true;
            else {
              NodeIterator iterator = cachedXPathAPI.selectNodeIterator(doc, xpath);
              return (iterator.nextNode() != null);
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.