Package java.util

Examples of java.util.LinkedList.removeLast()


    //  no change, stays with no styling
    // If there is styling:
    //  everthing gets the same style that the first block has
    if(_styleAtom != null) {
      LinkedList pStyles = _styleAtom.getParagraphStyles();
      while(pStyles.size() > 1) { pStyles.removeLast(); }

      LinkedList cStyles = _styleAtom.getCharacterStyles();
      while(cStyles.size() > 1) { cStyles.removeLast(); }

      _rtRuns[0].setText(s);
View Full Code Here


    if(_styleAtom != null) {
      LinkedList pStyles = _styleAtom.getParagraphStyles();
      while(pStyles.size() > 1) { pStyles.removeLast(); }

      LinkedList cStyles = _styleAtom.getCharacterStyles();
      while(cStyles.size() > 1) { cStyles.removeLast(); }

      _rtRuns[0].setText(s);
    } else {
      // Recreate rich text run with no styling
      _rtRuns[0] = new RichTextRun(this,0,s.length());
View Full Code Here

                    // that there are too many '..' elements.
                    // For now, ignore the extra '..'.
                }
                else
                {
                    pathElements.removeLast();
                }
            }
            else
            {
                pathElements.addLast( token );
View Full Code Here

      line = (String) lines.getLast();
      if (!checker.acceptString(line)) {
        break;
      } else {
        elided++;
        lines.removeLast();
      }
    }
    if ((elided > 0) || (maxLines < 1)) {
      final int EOL_LEN = EOL.length();
      int totalLength = 0;
View Full Code Here

                    // that there are too many '..' elements.
                    // For now, ignore the extra '..'.
                }
                else
                {
                    pathElements.removeLast();
                }
            }
            else
            {
                pathElements.addLast( token );
View Full Code Here

        stack.addFirst(returnPath);

        // don't let it grow too large.
        if (stack.size() > RETURN_STACK_MAX_SIZE) {
            stack.removeLast();
        }

        session.setAttribute(AttrConstants.RETURN_LOC_SES_ATTR, stack);
    }
View Full Code Here

        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

            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

            } 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

  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

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.