Package java.util

Examples of java.util.Stack.peek()


      if (stack.size() > 0) {
        if (debug) {
          logger.log(BasicLevel.DEBUG, "manage relational expression: "
              + "(children: " + node.jjtGetNumChildren()
              + ", stack: " + stack.size()
              + ", peek:" + stack.peek() + ")");
        }
        for (int i = 0; (i < (node.jjtGetNumChildren() - 1) && stack.size() > 0); i++) {
          int op = ((Integer) node.ops.get(node.jjtGetNumChildren() - 2 - i)).intValue();
          if (usedInRelationalExpresssion(op)) {
            Object child2 = stack.pop();
View Full Code Here


    }

    public Object visit(ASTSpeedoPrimary node, Object data) {
        visit((SimpleNode) node, data);
        Stack stack = (Stack) data;
        while(stack.size() >0 && REMOVER.equals(stack.peek())) {
            stack.pop();
        }
        if (stack.size() >0) {
            qf = (Expression) stack.pop();
        } // else there is no filter
View Full Code Here

        tab += '\t';
        visit((SimpleNode) node, data);
        tab = tab.substring(1);
        Stack stack = (Stack) data;
        if (stack.size() > 0) {
            if (CONTAINS_PATH_SET.equals(stack.peek())) {
                if (debug) {
                    logger.log(BasicLevel.ERROR, "remove the element of the stack");
                }
            } else {
                if (debug) {
View Full Code Here

            } else {
                if (debug) {
                    logger.log(BasicLevel.DEBUG, "manage relational expression: "
                        + "(children: " + node.jjtGetNumChildren()
                        + ", stack: " + stack.size()
                        + ", peek:" + stack.peek() + ")");
                }
                for (int i = 0; (i < (node.jjtGetNumChildren() - 1) && stack.size() > 0); i++) {
                    int op = ((Integer) node.ops.get(node.jjtGetNumChildren() - 2 - i)).intValue();
                    if (usedInRelationalExpresssion(op)) {
                        Object child2 = stack.pop();
View Full Code Here

        tab += '\t';
        visit((SimpleNode) node, data);
        tab = tab.substring(1);
        Stack stack = (Stack) data;
        if (stack.size() > 0
                && !CONTAINS_PATH_SET.equals(stack.peek())
                && !REMOVER.equals(stack.peek())) {
            Expression ret = (Expression) stack.pop();
            for (int i = 0; i < node.jjtGetNumChildren() - 1; i++) {
                if (debug) {
                    logger.log(BasicLevel.DEBUG, "Visit ConditionalExpression... children...[" + i + "]");
View Full Code Here

        visit((SimpleNode) node, data);
        tab = tab.substring(1);
        Stack stack = (Stack) data;
        if (stack.size() > 0
                && !CONTAINS_PATH_SET.equals(stack.peek())
                && !REMOVER.equals(stack.peek())) {
            Expression ret = (Expression) stack.pop();
            for (int i = 0; i < node.jjtGetNumChildren() - 1; i++) {
                if (debug) {
                    logger.log(BasicLevel.DEBUG, "Visit ConditionalExpression... children...[" + i + "]");
                }
View Full Code Here

            }
        }
        tab = tab.substring(1);
        Stack stack = (Stack) data;
        if (debug && stack.size() > 0) {
            logger.log(BasicLevel.DEBUG, tab + "stack.peek:" + stack.peek());
        }
        if (stack.size() > 0
                && !CONTAINS_PATH_SET.equals(stack.peek())
                && !REMOVER.equals(stack.peek())) {
            Object o = stack.pop();
View Full Code Here

        Stack stack = (Stack) data;
        if (debug && stack.size() > 0) {
            logger.log(BasicLevel.DEBUG, tab + "stack.peek:" + stack.peek());
        }
        if (stack.size() > 0
                && !CONTAINS_PATH_SET.equals(stack.peek())
                && !REMOVER.equals(stack.peek())) {
            Object o = stack.pop();
            if (node.ops.size() > 0) {
                switch (((Integer) node.ops.get(0)).intValue()) {
                case SpeedoQLConstants.MINUS:
View Full Code Here

        if (debug && stack.size() > 0) {
            logger.log(BasicLevel.DEBUG, tab + "stack.peek:" + stack.peek());
        }
        if (stack.size() > 0
                && !CONTAINS_PATH_SET.equals(stack.peek())
                && !REMOVER.equals(stack.peek())) {
            Object o = stack.pop();
            if (node.ops.size() > 0) {
                switch (((Integer) node.ops.get(0)).intValue()) {
                case SpeedoQLConstants.MINUS:
                    o = new UMinus((Expression) o);
View Full Code Here

            e = new BasicOperand(s);
        } else if (node.value instanceof Boolean) {
            e = new BasicOperand(((Boolean) node.value).booleanValue());
    }
    if (stack.size() > 0) {
      Object top = stack.peek();
      if (CONTAINS_PATH_SET.equals(top)) {
//TODO: Support the path.contains(path) operator
        logger.log(BasicLevel.ERROR, "The path.contains(path) operator is not yet implemented");
        return null;
      } else if (top instanceof String) {
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.