Package java.util

Examples of java.util.Stack.peek()


     * @return the URI corresponding to the prefix
     */
    public String lookupNamespace(String prefix)
    {
        final Stack stack = (Stack) m_namespaces.get(prefix);
        return stack != null && !stack.isEmpty() ? (String) stack.peek() : null;
    }

    /**
     * Given a namespace uri, and the namespaces mappings for the
     * current element, return the current prefix for that uri.
View Full Code Here


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

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

        stack.push(uri);
View Full Code Here

  if (existing instanceof VariableBase) {
      return((VariableBase)existing);
  }
  else if (existing instanceof Stack) {
      Stack stack = (Stack)existing;
      return((VariableBase)stack.peek());
  }
  return(null);
    }

    public void setXSLTC(XSLTC xsltc) {
View Full Code Here

        String widgetId = null;

        Stack stack = getWidgetIdStackFor(object, false);
       
        if (stack != null && !stack.empty()) {
            widgetId = (String) stack.peek();
        }
       
        return widgetId;
    }
   
View Full Code Here

        // element. So get a reference to the parent response element.
        Stack elementStack = ((XDIMEContextImpl)context).getStack();

        //test that the html element has been added to the element stack
        if (elementStack.size() < 2) {
            Object widgetResponseObject = elementStack.peek();
            if (!(widgetResponseObject instanceof ResponseResponseElement)) {
                logger.error("widget-response-not-found");
                throw new IllegalStateException("No widget response element found");
            } else {
                widgetResponseElement = (ResponseResponseElement) widgetResponseObject;
View Full Code Here

        // element. So get a reference to the parent html element.
        Stack elementStack = ((XDIMEContextImpl)context).getStack();

        //test that the html element has been added to the element stack
        if (elementStack.size() < 2) {
            Object html = elementStack.peek();
            if (!(html instanceof HtmlElement)) {
                logger.error("html-not-found");
                throw new IllegalStateException("No html element found");
            } else {
                htmlElement = (HtmlElement) html;
View Full Code Here

     * @return the URI corresponding to the prefix
     */
    public String lookupNamespace(String prefix)
    {
        final Stack stack = (Stack) m_namespaces.get(prefix);
        return stack != null && !stack.isEmpty() ? (String) stack.peek() : null;
    }

    /**
     * Given a namespace uri, and the namespaces mappings for the
     * current element, return the current prefix for that uri.
View Full Code Here

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

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

        stack.push(uri);
View Full Code Here

  if (existing instanceof VariableBase) {
      return((VariableBase)existing);
  }
  else if (existing instanceof Stack) {
      Stack stack = (Stack)existing;
      return((VariableBase)stack.peek());
  }
  return(null);
    }

    public void setXSLTC(XSLTC xsltc) {
View Full Code Here

    // XXX NOT USED ThreadActionData.setup();
    Stack txs = (Stack) _threadList.get();

    if (txs != null) {
      try {
        return (JABTransaction) txs.peek();
      } catch (EmptyStackException e) {
      }
    }

    return null;
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.