Package java.util

Examples of java.util.Stack.empty()


                    throw new RuntimeException("Mismatch - popped element = "
                            + poppedStack.element
                            + " finished target element = "
                            + targetElement.element);
                }
                if (!threadStack.empty()) {
                    parentElement = (TimedElement) threadStack.peek();
                }
            }
            if (parentElement == null) {
                buildElement.element.appendChild(targetElement.element);
View Full Code Here


                buildElement.element.appendChild(taskElement.element);
            } else {
                targetElement.element.appendChild(taskElement.element);
            }
            Stack threadStack = getStack();
            if (!threadStack.empty()) {
                TimedElement poppedStack = (TimedElement) threadStack.pop();
                if (poppedStack != taskElement) {
                    throw new RuntimeException("Mismatch - popped element = "
                            + poppedStack.element + " finished task element = "
                            + taskElement.element);
View Full Code Here

  // Add the line number
  formatLineNumber(++lineNumber);

  // Now "reopen" the elements that we closed...
  while (!tempStack.empty()) {
    StartElementInfo elem = (StartElementInfo) tempStack.pop();
    AttributeCollection attr = (AttributeCollection)elem.getAttributes();
    AttributeCollection newAttr = new AttributeCollection(namePool);

    for (int acount = 0; acount < attr.getLength(); acount++) {
View Full Code Here

        StringBuffer buff = new StringBuffer();
        while (parent != null) {
            stk.push(parent.getName());
            parent = parent.getParent();
        }
        while (!stk.empty()) {
            buff.append("/" + stk.pop());
        }
        buff.append(getName());
        namingContextName = buff.toString();
        }
View Full Code Here

    if (txs != null)
    {
      if (unregister)
      {
        while (!txs.empty())
        {
          BasicAction act = (BasicAction) txs.pop();

          if (act != null)
                    {
View Full Code Here

    public boolean accepts(final String text) {
        TransitionLabel currentLabel;
        Stack stack = new Stack();
        stack.push(automaton.getInitialState());
        stack.push(text);
        while (!stack.empty()) {
            String v = (String) stack.pop();
            State r = (State) stack.pop();

            if (v.length() == 0) {
                if (automaton.isFinal(r)) {
View Full Code Here

        if ((stack = (Stack) m_namespaces.get(prefix)) == null)
        {
            m_namespaces.put(prefix, stack = new Stack());
        }

        if (!stack.empty() && uri.equals(((MappingRecord)stack.peek()).m_uri))
        {
            return false;
        }
        MappingRecord map = new MappingRecord(prefix,uri,elemDepth);
        stack.push(map);
View Full Code Here

                }
                current = stack.pop();
            }
            ((TextElementArray) current).add(img);
            stack.push(current);
            while (!newStack.empty()) {
                stack.push(newStack.pop());
            }
            return;
        }
    }
View Full Code Here

          // This is part of an IF function.  Get the operands, but then
          // add it to the top of the if stack
          vaf.getOperands(tokenStack);

          Attribute ifattr = null;
          if (ifStack.empty())
          {
            ifattr = new Attribute(settings);
          }
          else
          {
View Full Code Here

                // Add points from last series to complete the base of the
                // polygon
                if (series != 0) {
                    Stack points = areaState.getLastSeriesPoints();
                    while (!points.empty()) {
                        Point point = (Point) points.pop();
                        areaState.getSeriesArea().addPoint((int) point.getX(),
                                (int) point.getY());
                    }
                }
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.