Examples of removeLast()


Examples of java.util.LinkedList.removeLast()

        LinkedList urlStack = (LinkedList) workflows.get(workflowName);
        if ((urlStack == null) || urlStack.isEmpty()) {
            return null;
        }

        String returnUrl = (String) urlStack.removeLast();
        workflows.put(workflowName, urlStack);
        session.setAttribute(AttrConstants.WORKFLOW_SES_ATTR, workflows);

        return returnUrl;
    }
View Full Code Here

Examples of java.util.LinkedList.removeLast()

            correctLastElement = ((org.apache.fop.fo.flow.Block)fobj)
                    .getCommonMarginBlock().spaceAfter.getSpace().isDiscard();
        }
        if (correctLastElement) {
            // remove the wrong element
            KnuthBox wrongBox = (KnuthBox) newList.removeLast();
            // if the old sequence is box(h) penalty(inf) glue(x,y,z) box(0)
            // (it cannot be parted and has some stretch or shrink)
            // the wrong box is the first one, not the last one
            LinkedList preserveList = new LinkedList();
            if (wrongBox.getW() == 0) {
View Full Code Here

Examples of java.util.LinkedList.removeLast()

            } else {
                map = (HashMap) expandedCombos.get(expandedCombos.size() - 1);
            }

            LinkedList l = new LinkedList(optionsLeft);
            ComboOption comboOption = (ComboOption) l.removeLast();
            int i = 0;
            for (Iterator iter = comboOption.values.iterator(); iter.hasNext();) {
                Object value = (Object) iter.next();
                if (i != 0) {
                    map = new HashMap(map);
View Full Code Here

Examples of java.util.LinkedList.removeLast()

  private Converter findRegisteredConverter(Class sourceClass, Class targetClass) {
    if (sourceClass.isInterface()) {
      LinkedList classQueue = new LinkedList();
      classQueue.addFirst(sourceClass);
      while (!classQueue.isEmpty()) {
        Class currentClass = (Class) classQueue.removeLast();
        Map sourceTargetConverters = findConvertersForSource(currentClass);
        Converter converter = findTargetConverter(sourceTargetConverters, targetClass);
        if (converter != null) {
          return converter;
        }
View Full Code Here

Examples of java.util.LinkedList.removeLast()

      return findTargetConverter(objectConverters, targetClass);
    } else {
      LinkedList classQueue = new LinkedList();
      classQueue.addFirst(sourceClass);
      while (!classQueue.isEmpty()) {
        Class currentClass = (Class) classQueue.removeLast();
        Map sourceTargetConverters = findConvertersForSource(currentClass);
        Converter converter = findTargetConverter(sourceTargetConverters, targetClass);
        if (converter != null) {
          return converter;
        }
View Full Code Here

Examples of java.util.LinkedList.removeLast()

    }
    if (targetClass.isInterface()) {
      LinkedList classQueue = new LinkedList();
      classQueue.addFirst(targetClass);
      while (!classQueue.isEmpty()) {
        Class currentClass = (Class) classQueue.removeLast();
        Converter converter = (Converter) sourceTargetConverters.get(currentClass);
        if (converter != null) {
          return converter;
        }
        Class[] interfaces = currentClass.getInterfaces();
View Full Code Here

Examples of java.util.LinkedList.removeLast()

      return (Converter) sourceTargetConverters.get(Object.class);
    } else {
      LinkedList classQueue = new LinkedList();
      classQueue.addFirst(targetClass);
      while (!classQueue.isEmpty()) {
        Class currentClass = (Class) classQueue.removeLast();
        Converter converter = (Converter) sourceTargetConverters.get(currentClass);
        if (converter != null) {
          return converter;
        }
        if (currentClass.getSuperclass() != null) {
View Full Code Here

Examples of java.util.LinkedList.removeLast()

        }
        // Add the new file at the start of the list
        newRecentFiles.add(0, loadedFileName);
        // Remove the last item from the list if it was a brand new file
        if(!alreadyExists) {
            newRecentFiles.removeLast();
        }
        // Store the recent files
        for(int i = 0; i < NUMBER_OF_MENU_ITEMS; i++) {
            String fileName = (String)newRecentFiles.get(i);
            if(fileName != null) {
View Full Code Here

Examples of java.util.LinkedList.removeLast()

        for(int x = loopCount; x > 0; x--) {
            // unrolled a few times to minimize effect of loop
            ll.addFirst(o1);
            ll.addLast(o2);
            ll.removeFirst();
            ll.removeLast();
            ll.add(o1);
            ll.remove(0);
            //
            ll.addFirst(o1);
            ll.addLast(o2);
View Full Code Here

Examples of java.util.LinkedList.removeLast()

            ll.remove(0);
            //
            ll.addFirst(o1);
            ll.addLast(o2);
            ll.removeFirst();
            ll.removeLast();
            ll.add(o1);
            ll.remove(0);
            //
            ll.addFirst(o1);
            ll.addLast(o2);
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.