Package java.util

Examples of java.util.LinkedList.removeLast()


          if ( stack.size() == 0 ){
           
            break;
          }
         
          node = (DHTRouterNodeImpl)stack.removeLast();
        }
      }
    }finally{
     
      this_mon.exit();
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

            throw new DeploymentSyntaxException("No fileName specified for package command");
        }

        // Read off packageFile which is always the last argument
        File packageFile;
        packageFile = new File((String) args.removeLast());
        File parent = packageFile.getAbsoluteFile().getParentFile();
        if (!parent.exists() || !parent.canWrite()) {
            throw new DeploymentSyntaxException("Cannot write to output file " + packageFile.getAbsolutePath());
        }
View Full Code Here

        // Read off the plan and module
        File module = null;
        File plan = null;
        if (!args.isEmpty()) {
            // if the arg is a directory or jar file, it must be the module; otherwise it is the plan
            File test = new File((String) args.removeLast()).getAbsoluteFile();
            if (DeployUtils.isJarFile(test) || test.isDirectory()) {
                module = test;
            } else {
                plan = test;
            }
View Full Code Here

            } else {
                plan = test;
            }
        }
        if (!args.isEmpty()) {
            File test = new File((String) args.removeLast()).getAbsoluteFile();
            if (DeployUtils.isJarFile(test) || test.isDirectory()) {
                if (module != null) {
                    throw new DeploymentSyntaxException("Module and plan cannot both be JAR files or directories!");
                }
                module = test;
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

            //Remove the last penalty produced by the combining algorithm (see TableStepper), for the last step
            ListElement last = (ListElement)returnList.getLast();
            if (last.isPenalty() || last instanceof BreakElement) {
                if (!last.isForcedBreak()) {
                    //Only remove if we don't signal a forced break
                    returnList.removeLast();
                }
            }
        }

        //fox:widow-content-limit
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

            returnList.add(sequence);
        }

        if (((List)returnList.getLast()).size() == 0) {
            //Remove an empty sequence because of a trailing newline
            returnList.removeLast();
        }
        setFinished(true);
        if (returnList.size() > 0) {
            return returnList;
        } else {
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.