Package java.util

Examples of java.util.Stack.empty()


            }
            return this;
        }
        */
        final Stack stack = (Stack)environmentStack.get();
        if ( null != stack && !stack.empty()) {
            final Object[] objects = (Object[])stack.peek();
            final Map components = (Map)objects[2];
            final Object[] o = (Object[])components.get(role);
            if ( null != o  ) {
                final Component component = (Component) o[0];
View Full Code Here


            }
        }

        final Component component = super.lookup( role );
        if (null != component && component instanceof RequestLifecycleComponent) {
            if (stack == null || stack.empty()) {
                throw new ComponentException("ComponentManager has no Environment Stack.");
            }
            final Object[] objects = (Object[]) stack.peek();
            final Map components = (Map)objects[2];
            try {
View Full Code Here

    }

    public synchronized Item pop(ThreadId tid) {
        Stack s = (Stack) map.get(tid);
        Item i = (Item) s.pop();
        if (s.empty()) {
            map.remove(tid);
        }
        return i;
    }
View Full Code Here

                    }
                }

                // Now we can walk the dependencies bottom up - re-deploying and
                // starting them
                while (!dependencies.empty()) {
                    JbiDeployableArtifact jbiDeployable = (JbiDeployableArtifact) dependencies
                            .pop();
                    if (forceUpdate || !isDeployed(jbiDeployable)) {
                        deployDependency(jbiDeployable, deferExceptions);
                        if (!deferExceptions) {
View Full Code Here

            _pools.put(key,stack);
        }
        Object obj = null;
        do {
            boolean newlyMade = false;
            if (!stack.empty()) {
                obj = stack.pop();
                _totIdle--;
            } else {
                if(null == _factory) {
                    throw new NoSuchElementException("pools without a factory cannot create new objects as needed.");
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

    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

            targetElement.element.setAttribute(TIME_ATTR,
                    DefaultLogger.formatTime(totalTime));

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

                if (poppedStack != targetElement) {
                    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

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.