Package java.util

Examples of java.util.LinkedList.removeLast()


            nextSequenceStartsOn = handleSpanChange(childLC, nextSequenceStartsOn);
           
            Position breakPosition = null;
            if (((KnuthElement) returnedList.getLast()).isPenalty()
                    && ((KnuthPenalty) returnedList.getLast()).getP() == -KnuthElement.INFINITE) {
                KnuthPenalty breakPenalty = (KnuthPenalty) returnedList
                        .removeLast();
                breakPosition = breakPenalty.getPosition();
                switch (breakPenalty.getBreakClass()) {
                case Constants.EN_PAGE:
                    log.debug("PLM> break - PAGE");
View Full Code Here


    //  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

                    // the first element is the root element;
                    // ".." would refer to the parent of root
                    throw new MalformedPathException(
                            "Path can not be canonicalized: unresolvable '..' element");
                }
                queue.removeLast();
                if (queue.isEmpty()) {
                    last = PARENT_ELEMENT;
                } else {
                    last = (PathElement) queue.getLast();
                }
View Full Code Here

    public Object pop() {
        LinkedList list = listThreadLocal.getList();
        if (list.isEmpty()) {
            return null;
        }
        return list.removeLast();
    }

    public void clear() {
        listThreadLocal.getList().clear();
    }
View Full Code Here

        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

            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

            ll.remove(0);
            //
            ll.addFirst(o1);
            ll.addLast(o2);
            ll.removeFirst();
            ll.removeLast();
            ll.add(o1);
            ll.remove(0);
        }
        endTime = System.currentTimeMillis();  
        System.out.println("Time with LinkedList: " + (endTime - startTime) + " ms");
View Full Code Here

    {
        LinkedList list = (LinkedList) threadTable.get(thread);

        if (list != null)
        {
            list.removeLast();

            if (list.isEmpty())
            {
                threadTable.remove(thread);
            }
View Full Code Here

      for (int i = 0; i < priorities; i++)
      {
         LinkedList ll = linkedLists[i];
         if (!ll.isEmpty())
         {
            obj = ll.removeLast();
         }
         if (obj != null)
         {
            break;
         }
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.