Package org.boris.expr

Source Code of org.boris.expr.ListenerEngineTest

/*******************************************************************************
* This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
*     Peter Smith
*******************************************************************************/
package org.boris.expr;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import org.boris.expr.engine.ListenerEngine;
import org.boris.expr.function.ExcelFunctionProvider;

public class ListenerEngineTest
{
    public static void main(String[] args) throws Exception {
        ListenerEngine le = new ListenerEngine(new ExcelFunctionProvider());
        le.addListener(new DebugEngineListener());
        le.set("a", "b+c");
        le.set("c", "sin(123+b)");
        le.set("b", "54.32");
        ExecutorService es = Executors.newFixedThreadPool(5);
        le.startCalculation(es, 5);
        Thread.sleep(500);
        le.set("d", "a*b");
        le.set("b", "2.");
    }
}
TOP

Related Classes of org.boris.expr.ListenerEngineTest

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.