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

    LinkedList clean = new LinkedList();
    while (st.hasMoreTokens()) {
      String token = st.nextToken();
      if ("..".equals(token)) {
        if (!clean.isEmpty() && !"..".equals(clean.getLast())) {
          clean.removeLast();
          if (!st.hasMoreTokens()) {
            isDir = true;
          }
        } else {
          clean.add("..");
View Full Code Here

      }
      LinkedList classQueue = new LinkedList();
      classQueue.addFirst(rootArgumentType);

      while (!classQueue.isEmpty()) {
        Class argumentType = (Class)classQueue.removeLast();
        // Check for a visit method on the visitor class matching this
        // argument type.
        try {
          if (logger.isDebugEnabled()) {
            logger.debug("Looking for method " + VISIT_METHOD + "(" + argumentType + ")");
View Full Code Here

      }
      LinkedList classQueue = new LinkedList();
      classQueue.addFirst(rootArgumentType);

      while (!classQueue.isEmpty()) {
        Class argumentType = (Class) classQueue.removeLast();
        // Check for a visit method on the visitor class matching this
        // argument type.
        try {
          if (logger.isTraceEnabled()) {
            logger.trace("Looking for method " + VISIT_METHOD + "(" + argumentType + ")");
View Full Code Here

      }
      LinkedList classQueue = new LinkedList();
      classQueue.addFirst(rootArgumentType);

      while (!classQueue.isEmpty()) {
        Class argumentType = (Class)classQueue.removeLast();
        // Check for a visit method on the visitor class matching this
        // argument type.
        try {
          if (logger.isTraceEnabled()) {
            logger.trace("Looking for method " + VISIT_METHOD + "(" + argumentType + ")");
View Full Code Here

            LinkedList queue = new LinkedList();
            Path.Element last = PARENT_ELEMENT;
            for (int i = 0; i < elements.length; i++) {
                Path.Element elem = elements[i];
                if (elem.denotesParent() && !last.denotesParent()) {
                    queue.removeLast();
                    if (queue.isEmpty()) {
                        last = PARENT_ELEMENT;
                    } else {
                        last = (Path.Element) queue.getLast();
                    }
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

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.