Package java.util

Examples of java.util.LinkedList.addAll()


    List list = new LinkedList();
   
    for(int i = 0; i<sources.length; i++) {
      try {
        List results = sources[i].search(artist, album);
        list.addAll(results);
      } catch(CoverException e) {
        //Do not add the results of the source since we got an exception
      }
    }
   
View Full Code Here


   private void setData(InterceptorType type, Collection newList)
   {
      LinkedList list = getInterceptors(type);
      list.clear();
      list.addAll(newList);
   }

   public void copyClientInterceptorsTo(ClientInterceptorRepositoryImpl copyTo)
   {
      for (Entry<InterceptorType, LinkedList<?>> entry : interceptorLists
View Full Code Here

    this.abort = getProgressDialog().isAborted();
    List errorFiles = new LinkedList();
    if (f.isDirectory()) {
      File[] files = f.listFiles(aff);
      for (int i = 0; i < files.length && !this.abort; i++)
        errorFiles.addAll(recursiveAction(files[i]));
    } else if (!abort) {
      getProgressDialog().setDescription("Processing " + f.getName());
      if (f instanceof AudioFile) {
        try {
          audioFileAction((AudioFile) f);
View Full Code Here

    }

    getProgressDialog().setTitle("Performing changes");
    List errorFiles = new LinkedList();
    while (it.hasNext() && !abort) {
      errorFiles.addAll(recursiveAction((File) it.next()));
    }

    finalizeAction();

    tagEditorFrame.refreshCurrentTableView();
View Full Code Here

            WorkingMemory workingMemory = ruleBase.newWorkingMemory( );

            Number fact = new Number( factValues[i] );
            workingMemory.assertObject( fact );
            workingMemory.fireAllRules( );
            results.addAll( workingMemory.getObjects( ) );

            verbose( fact + ":" + stopwatch( 1 ) );
        }

        System.out.println( "Total time:" + stopwatch( 0 ) );
View Full Code Here

    LinkedList returnValue = new LinkedList();
    if (! tm.isLeaf(root)) {
      int numChild = tm.getChildCount(root);
      for (int i = 0; i < numChild; i++) {
        Object child = tm.getChild(root, i);
        returnValue.addAll(parseTree(tm, child));
      }
    }

    returnValue.add(root);
    return returnValue;
View Full Code Here

        // Build a linked list of type descriptions. We will make multiple passes
        // over this, adding types to the CAS and removing them from the linked
        // list. We continue until the list is empty or we cannot make any
        // progress.
        LinkedList typeList = new LinkedList();
        typeList.addAll(Arrays.asList(types));
        int numTypes = typeList.size();
        int lastNumTypes;
        LinkedList typesInOrderOfCreation = new LinkedList();
        do {
          lastNumTypes = numTypes;
View Full Code Here

                File file = new File(fullName);
                if (file.isDirectory()) {
                    if (recursive) {
                        String relativeName = relativeBase.length() == 0 ? fileName
                                              : (relativeBase + '/' + fileName);
                        list.addAll(findFiles(fullName, pattern, fullPath,
                                              recursive, relativeName));
                    }
                } else if (fullPath) {
                    list.add(fullName);
                } else {
View Full Code Here

                    Thread.sleep(1000);
                }
            }
            while (retry);
           
            allJobIds.addAll(jobIds);
           
            System.out.println("submitted bulk job with jobids:");
           
            Iterator i = jobIds.iterator();
           
View Full Code Here

            writer.println("#" + Calendar.getInstance().getTime());

        List lines = new LinkedList();
        // first write all the existing props as they were initially read
        if (source != null)
            lines.addAll(source);

        // next write out new keys, then the rest of the keys
        LinkedHashSet keys = new LinkedHashSet();
        keys.addAll(newKeys);
        keys.addAll(keySet());
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.