Package org.openbel.framework.common.lang

Examples of org.openbel.framework.common.lang.Function


    @Test
    public void testFunctionEnumFunctions() {
        FunctionEnum[] funcs = FunctionEnum.values();
        Set<Class<?>> set1 = new HashSet<Class<?>>();
        for (FunctionEnum func : funcs) {
            Function fx = func.getFunction();
            assertNotNull(func + " does not have a function", fx);
            set1.add(fx.getClass());
        }
        int actual = funcs.length;
        int expected = set1.size();
        assertEquals("incorrect number of functions", expected, actual);
    }
View Full Code Here


            final String lf = term.toBELLongForm();
            final String err = e.getMessage();
            throw new SemanticWarning(lf, err);
        }

        final Function function = funcEnum.getFunction();

        if (!function.validSignature(sig)) {
            final Map<Signature, SemanticStatus> map = function.getStatus(sig);
            final String lf = term.toBELLongForm();
            final String err = format(SEMANTIC_TERM_FAILURE, lf);
            throw new SemanticWarning(null, err, sig, map);
        }
    }
View Full Code Here

            final String lf = term.toBELLongForm();
            final String err = e.getMessage();
            throw new SemanticWarning(lf, err);
        }

        final Function function = funcEnum.getFunction();

        if (!function.validSignature(sig)) {
            final Map<Signature, SemanticStatus> map = function.getStatus(sig);
            final String lf = term.toBELLongForm();
            final String err = format(SEMANTIC_TERM_FAILURE, lf);
            throw new SemanticWarning(null, err, sig, map);
        }
    }
View Full Code Here

TOP

Related Classes of org.openbel.framework.common.lang.Function

Copyright © 2018 www.massapicom. 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.