Examples of empty()


Examples of java.util.Stack.empty()

    }

    public Object peek () {
      Object obj = null;
      Stack stack = (Stack)get();
      if (!stack.empty()) obj = stack.peek();
      return obj;
    }
   
    public void push (Object obj) {
      Stack stack = (Stack)get();
View Full Code Here

Examples of java.util.Stack.empty()

      return obj;
    }
   
    public void push (Object obj) {
      Stack stack = (Stack)get();
      if (!stack.empty() && obj == stack.peek()) throw new RuntimeException(obj.toString());
      stack.push(obj);
    }
   
    public Object pop () {
      Stack stack = (Stack)get();
View Full Code Here

Examples of java.util.Stack.empty()

  // Get the stack that contains URIs for the specified prefix
  if ((stack = (Stack)_namespaces.get(prefix)) == null) {
      _namespaces.put(prefix, stack = new Stack());
  }

  if (!stack.empty() && uri.equals(stack.peek())) {
      return false;
  }

  stack.push(uri);
  _prefixStack.push(prefix);
View Full Code Here

Examples of java.util.Stack.empty()

   * Returns the namespace URI that a prefix currently maps to
   */
  private String getNamespaceURI(String prefix) {
      // Get the stack associated with this namespace prefix
      final Stack stack = (Stack)_nsPrefixes.get(prefix);
      return (stack != null && !stack.empty()) ? (String) stack.peek()
    : EMPTYSTRING;
  }

  /**
   * Call this when an xml:space attribute is encountered to
View Full Code Here

Examples of java.util.Stack.empty()

   * SAX2: End the scope of a prefix-URI Namespace mapping.
   */
  public void endPrefixMapping(String prefix) {
      // Get the stack associated with this namespace prefix
      final Stack stack = (Stack)_nsPrefixes.get(prefix);
      if ((stack != null) && (!stack.empty())) stack.pop();
  }

  /**
   * SAX2: Report an XML comment anywhere in the document.
   */
 
View Full Code Here

Examples of java.util.Stack.empty()

                final StringWriter s0 = new StringWriter();
                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());
View Full Code Here

Examples of java.util.Stack.empty()

        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

Examples of java.util.Stack.empty()

        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

Examples of java.util.Stack.empty()

        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

Examples of java.util.Stack.empty()

                stk.push(bItem);
              }
              iLoop_RowsDone++;
            }

            while (stk.empty() == false) {
              bItem = (OQItem) stk.pop();
              topicItems.addElement (bItem);
            }

          }
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.