Examples of cases()


Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForSwitch.cases()

    final ExpressionNodeForSwitch switchNode = (ExpressionNodeForSwitch) node();
    final TypedResult valueArg = evaluateArgument( switchNode.offsetOfValueInArguments() );
    if (valueArg.hasConstantValue()) {
      final int value = type().toInt( valueArg.getConstantValue(), -1 );
      if (value >= 0) {
        final Iterable<ExpressionNodeForSwitchCase> cases = switchNode.cases();
        int iCase = 0;
        for (ExpressionNodeForSwitchCase caze : cases) {
          if (value == caze.caseValue()) {
            final EvalSwitchCase caseEval = (EvalSwitchCase) arguments().get(
                iCase + switchNode.offsetOfCasesInArguments() );
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForSwitch.cases()

    int nCases = switchNode.numberOfCases();
    if (nCases > 0) {
      final int[] switchValues = new int[ nCases ];
      final ExpressionNodeForSwitchCase[] switchValueCases = new ExpressionNodeForSwitchCase[ nCases ];
      int iSwitchValue = 0;
      for (ExpressionNodeForSwitchCase caze : switchNode.cases()) {
        switchValueCases[ iSwitchValue ] = caze;
        switchValues[ iSwitchValue ] = caze.caseValue();
        iSwitchValue++;
      }
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.