Package java.util

Examples of java.util.Stack.pop()


            Configuration conf = (Configuration) iter.next();
            String[] ext = conf.getExtends();
            for (int i = 0; i < ext.length; i++) {
                confs.push(conf.getName());
                checkConf(confs, ext[i].trim());
                confs.pop();
            }
        }
    }

    private void checkConf(Stack confs, String confName) {
View Full Code Here


        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 ("..".equals(thisToken)) {
                if (s.size() < 2) {
                    // Cannot resolve it, so skip it.
                    return new File(path);
                }
                s.pop();
            } else { // plain component
                s.push(thisToken);
            }
        }
        StringBuffer sb = new StringBuffer();
View Full Code Here

    }
       
    public void endPrefixMapping(String prefix) {

        Stack uriStack = (Stack) namespaceMap.get(prefix);
        uriStack.pop();
    }
   
   
    public void ignorableWhitespace(char[] data, int start, int len) {
View Full Code Here

                        // not a doc tag or xml
                        if (!stack.isEmpty()) { // we found the closing tag before
                            String closedName = (String) stack.peek();
                            if (closedName.equalsIgnoreCase(doc.substring(offset + 1, offset + 1
                                    + closedName.length()))) {
                                stack.pop();
                                continue;
                            }
                        } else {
                            if (parentEndTagReached) {
                                return new int[] {offset + 1, lastSpaceIndex};
View Full Code Here

                final StringWriter s1 = new StringWriter();
                final PrintWriter p0 = new PrintWriter(s0);
                final PrintWriter p1 = new PrintWriter(s1);
                int j = 0;
                while (!msg.empty()) {
                    p0.println("    <<< " + pad(j) + msg.pop());
                    p1.println("    >>> " + pad(j) + msg.pop());
                    j += 4;
                }
                out.println(s0.toString());
                out.println(s1.toString());
View Full Code Here

                final PrintWriter p0 = new PrintWriter(s0);
                final PrintWriter p1 = new PrintWriter(s1);
                int j = 0;
                while (!msg.empty()) {
                    p0.println("    <<< " + pad(j) + msg.pop());
                    p1.println("    >>> " + pad(j) + msg.pop());
                    j += 4;
                }
                out.println(s0.toString());
                out.println(s1.toString());
View Full Code Here

            addExtension("jsp");
            addExtension("jspx");
        }

        while (!dirs.isEmpty()) {
            String s = dirs.pop().toString();
            File f = new File(s);
            if (f.exists() && f.isDirectory()) {
                String[] files = f.list();
                String ext;
                for (int i = 0; (files != null) && i < files.length; i++) {
View Full Code Here

            stack = new Stack();
            stack.ensureCapacity( _initSleepingCapacity > _maxSleeping ? _maxSleeping : _initSleepingCapacity);
            _pools.put(key,stack);
        }
        try {
            obj = stack.pop();
            _totIdle--;
        } catch(Exception e) {
            if(null == _factory) {
                throw new NoSuchElementException();
            } else {
View Full Code Here

    public void removeVariable(QName name) {
  Object existing = _variableScope.get(name);
  if (existing instanceof Stack) {
      Stack stack = (Stack)existing;
      if (!stack.isEmpty()) stack.pop();
      if (!stack.isEmpty()) return;
  }
  _variableScope.remove(name);
    }
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.