Package java.util

Examples of java.util.Stack.peek()


        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


            if (uriStack.isEmpty()) {
                _sax.startPrefixMapping(prefix, uri);
                uriStack.push(uri);
            }
            else {
                final String lastUri = (String) uriStack.peek();
                if (!lastUri.equals(uri)) {
                    _sax.startPrefixMapping(prefix, uri);
                    uriStack.push(uri);
                }
                else {
View Full Code Here

      if (uriStack.isEmpty()) {
    _sax.startPrefixMapping(prefix, uri);
    uriStack.push(uri);
      }
      else {
    final String lastUri = (String) uriStack.peek();
    if (!lastUri.equals(uri)) {
        _sax.startPrefixMapping(prefix, uri);
        uriStack.push(uri);
    }
    else {
View Full Code Here

     */
    public String lookupNamespace(String prefix)
    {
        final Stack stack = (Stack) m_namespaces.get(prefix);
        return stack != null && !stack.isEmpty() ?
            ((MappingRecord) stack.peek()).m_uri : null;
    }
   
    MappingRecord getMappingFromPrefix(String prefix) {
        final Stack stack = (Stack) m_namespaces.get(prefix);
        return stack != null && !stack.isEmpty() ?
View Full Code Here

    }
   
    MappingRecord getMappingFromPrefix(String prefix) {
        final Stack stack = (Stack) m_namespaces.get(prefix);
        return stack != null && !stack.isEmpty() ?
            ((MappingRecord) 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(((MappingRecord)stack.peek()).m_uri))
        {
            return false;
        }
        MappingRecord map = new MappingRecord(prefix,uri,elemDepth);
        stack.push(map);
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

            switch (token.getType()){
                case TEXT:
                    if (stack.empty()) {
                        stack.push(new Token(EXPR, token.getStringValue()));
                    } else {
                        last = (Token)stack.peek();
                        if (last.hasType(EXPR)) {
                            last.merge(token);
                        } else {
                            stack.push(new Token(EXPR, token.getStringValue()));
                        }
View Full Code Here

                        result = processVariable(expr, mapStack, stackSize);
                    }
                    if (stack.empty()) {
                        stack.push(result);
                    } else {
                        last = (Token)stack.peek();
                        if (last.hasType(EXPR)) {
                            last.merge(result);
                        } else {
                            stack.push(result);
                        }
View Full Code Here

        Portlet p = null;

        if ((stack!=null)&&(!stack.empty()))
        {
            p = (Portlet)stack.peek();
        }

        /**
         * Save the title of this currently selected portlet
         * --------------------------------------------------------------------------
 
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.