Examples of Stack


Examples of java.util.Stack

    }
   
    public Node compile(String expression)
    {
        p = new Lexer(expression);
        stack = new Stack();
        return compileExpression();
    }
View Full Code Here

Examples of java.util.Stack

    }
   
    public Node compileVariable(String expression)
    {
        p = new Lexer(expression);
        stack = new Stack();
        if (!compileIdentifier())
        {
            throw new QueryCompilerSyntaxException("expected identifier", p.getIndex(), p.getInput());
        }
        if (!compileIdentifier())
View Full Code Here

Examples of java.util.Stack

        return compileOrder(p);
    }

    public Node[] compileOrder(Lexer p)
    {
        stack = new Stack();
        return compileOrderExpression();
    }
View Full Code Here

Examples of java.util.Stack

        return compileTupple(p);
    }

    public Node[] compileTupple(Lexer p)
    {
        stack = new Stack();
        List nodes = new ArrayList();
        do
        {
            compileExpression();
            Node expr = (Node) stack.pop();
View Full Code Here

Examples of java.util.Stack

    }

    public Node[][] compileVariables(String expression)
    {
        p = new Lexer(expression);
        stack = new Stack();
        List nodes = new ArrayList();
        do
        {
            compilePrimary();
            if (stack.isEmpty())
View Full Code Here

Examples of java.util.Stack

                    FileObject[] newChildren = this.file.getChildren();
                    if (this.children != null)
                    {
                        // See which new children are not listed in the current children map.
                        Map newChildrenMap = new HashMap();
                        Stack missingChildren = new Stack();

                        for (int i = 0; i < newChildren.length; i++)
                        {
                            newChildrenMap.put(newChildren[i].getName(), new
                                Object()); // null ?
                            // If the child's not there
                            if
                            (!this.children.containsKey(newChildren[i].getName()))
                            {
                                missingChildren.push(newChildren[i]);
                            }
                        }

                        this.children = newChildrenMap;

                        // If there were missing children
                        if (!missingChildren.empty())
                        {

                            while (!missingChildren.empty())
                            {
                                FileObject child = (FileObject)
                                    missingChildren.pop();
                                this.fireAllCreate(child);
                            }
                        }

                    }
View Full Code Here

Examples of maelstrom.funge.interpreter.stack.Stack

public abstract class LogicalOperator implements Operator {

  public static class Not implements Operator {

    public void perform(Funge funge) {
      Stack stack = funge.getStackStack().getStack();

      stack.push(stack.pop() == 0 ? 1 : 0);
    }
View Full Code Here

Examples of net.sourceforge.processdash.data.compiler.Stack

        String prefix = asString(getArg(arguments, 1));

        CompiledScript script = Compiler.compile(expression);

        try {
            Stack stack = new ListStack();
            if (prefix != null)
                context = new RelativeExpressionContext(context, prefix);
            script.run(stack, context);
            return stack.pop();
        } catch (ExecutionException ee) {
            return null;
        }
    }
View Full Code Here

Examples of net.sourceforge.theba.core.Stack

    /**
     * This is the code executed to track all currently selected seeds
     */
    @Override
    public void track() {
        Stack input = control.getStack();
        String min = JOptionPane.showInputDialog("Set minimum region size in voxels", "100");
        if (min == null) {
            return;
        }
        long totalSize = 0;
        int removeCount = 0;
        int count = 0;
        short id = 255;
        for (int z = 0; z < input.getDepth(); z++) {
            for (int y = 0; y < input.getHeight(); y++) {
                for (int x = 0; x < input.getWidth(); x++) {
                    short val = input.getVoxelUnchecked(x, y, z);
                    if (val == 0xff) {
                        id++;
                        long size = ImageFunctions.floodFill3D(input, x, y, z, id);
                        totalSize += size;
                        if (size < 100) {
View Full Code Here

Examples of ofc4j.model.elements.StackedBarChart.Stack

    key.setText( text );
    key.setColour( getColor( col ) );
    sbc.addKeys( key );

    for ( int row = 0; row < getRowCount(); row++ ) {
      Stack stack = null;
      if ( sbc.getStackCount() > row ) {
        stack = sbc.stack( row );
      } else {
        stack = sbc.newStack();
      }
      double d = ( (Number) getValueAt( row, col ) ).doubleValue();
      stack.addStackValues( new StackValue( d, getColor( col ) ) );
    }

    return sbc;
  }
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.