Package caltrop.interpreter.environment

Examples of caltrop.interpreter.environment.Environment.bind()


            public int arity() {
                return 1;
            }
        }));

        env.bind("$and", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    BooleanToken a = (BooleanToken) args[0];
                    BooleanToken b = (BooleanToken) args[1];
                    return a.and(b);
View Full Code Here


            public int arity() {
                return 2;
            }
        }));

        env.bind("$or", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    BooleanToken a = (BooleanToken) args[0];
                    BooleanToken b = (BooleanToken) args[1];
                    return a.or(b);
View Full Code Here

            public int arity() {
                return 2;
            }
        }));

        env.bind("$eq", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    Token a = (Token) args[0];
                    Token b = (Token) args[1];
                    return a.isEqualTo(b);
View Full Code Here

            public int arity() {
                return 2;
            }
        }));

        env.bind("$ne", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    Token a = (Token) args[0];
                    Token b = (Token) args[1];
                    return a.isEqualTo(b).not();
View Full Code Here

            public int arity() {
                return 2;
            }
        }));

        env.bind("$lt", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    ScalarToken a = (ScalarToken) args[0];
                    ScalarToken b = (ScalarToken) args[1];
                    return a.isLessThan(b);
View Full Code Here

            public int arity() {
                return 2;
            }
        }));

        env.bind("$le", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    ScalarToken a = (ScalarToken) args[0];
                    ScalarToken b = (ScalarToken) args[1];
                    return a.isGreaterThan(b).not();
View Full Code Here

            public int arity() {
                return 2;
            }
        }));

        env.bind("$gt", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    ScalarToken a = (ScalarToken) args[0];
                    ScalarToken b = (ScalarToken) args[1];
                    return a.isGreaterThan(b);
View Full Code Here

            public int arity() {
                return 2;
            }
        }));

        env.bind("$ge", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    ScalarToken a = (ScalarToken) args[0];
                    ScalarToken b = (ScalarToken) args[1];
                    return a.isLessThan(b).not();
View Full Code Here

            public int arity() {
                return 2;
            }
        }));

        env.bind("$negate", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    ScalarToken a = (ScalarToken) args[0];

                    return a.zero().subtract(a);
View Full Code Here

            public int arity() {
                return 1;
            }
        }));

        env.bind("$add", _theContext.createFunction(new Function() {
            // Compute the add operation on scalar arguments, the
            // list concatenation operation on lists, or the set
            // union on sets.
            public Object apply(Object[] args) {
                try {
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.