Package ptolemy.data

Examples of ptolemy.data.ScalarToken.intValue()


            Variable weightAttribute = (Variable) temporaryAttribute;
            Token weightToken = weightAttribute.getToken();

            if (weightToken instanceof ScalarToken) {
                ScalarToken weightScalarToken = (ScalarToken) weightToken;
                return weightScalarToken.intValue();
            }
            return 0;
        } else {
            _debug(" something wrong with the edge");
            return 0;
View Full Code Here


        env.bind("INT19_mul", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    IntToken a = (IntToken) args[0];
                    IntToken b = (IntToken) args[1];
                    int res = (a.intValue() * b.intValue()); // & 0x7ffff;
                    return _theContext.createInteger(res);
                } catch (Exception ex) {
                    throw new InterpreterException(
                            "Function 'RGBCLIP': Cannot apply.", ex);
                }
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.