Package java.util

Examples of java.util.ArrayList.toArray()


      if (file.getPath().indexOf(word) != -1)
        matches.add(file);
      moveToNextFile();
    }
    IQueryResult[] match= new IQueryResult[matches.size()];
    matches.toArray(match);
    return match;
  }
   
  /**
   * @see IndexInput#setFirstFile()
View Full Code Here


                                while ((split = arg.indexOf(',', base)) > 0) {
                                    types.add(arg.substring(base, split));
                                    base = split + 1;
                                }
                                types.add(arg.substring(base));
                                rsptypes = (String[])types.toArray(new String[types.size()]);
                                break;
                            }
                            case 's':
                                reqtype = arg.substring(3);
                                break;
View Full Code Here

                        if (rgnhits[j]) {
                            regions[fill++] = m_regions[j];
                        }
                    }
                    set.setRegions(regions);
                    set.setQuakes((Quake[])matches.
                        toArray(new Quake[matches.size()]));
                    sets.add(set);
                }
               
            }
View Full Code Here

          break;
        v.add(new String(path));
        prevPath= path;
      }
      paths= new String[v.size()];
      v.toArray(paths);
    }
    return paths;
  }
  public boolean isEmpty() {
    return offset == 0;
View Full Code Here

      if (file.getPath().indexOf(word) != -1)
        matches.add(file.getPath());
      moveToNextFile();
    }
    IQueryResult[] match= new IQueryResult[matches.size()];
    matches.toArray(match);
    return match;
  }
  /**
   * @see IndexInput#setFirstFile()
   */
 
View Full Code Here

      connections[i].removeListener(invokeListener);

    synchronized (instancesLock) {
      ArrayList<Connection> temp = new ArrayList(Arrays.asList(instances));
      temp.remove(this);
      instances = temp.toArray(new ObjectSpace[temp.size()]);
    }

    if (TRACE) trace("kryonet", "Closed ObjectSpace.");
  }
View Full Code Here

    connection.removeListener(invokeListener);

    synchronized (connectionsLock) {
      ArrayList<Connection> temp = new ArrayList(Arrays.asList(connections));
      temp.remove(connection);
      connections = temp.toArray(new Connection[temp.size()]);
    }

    if (TRACE) trace("kryonet", "Removed connection from ObjectSpace: " + connection);
  }
View Full Code Here

    if (isOnRemovalEnabled()) {
      addFile(result, COConfigurationManager.getStringParameter("File.move.download.removed.path"));
      addFile(result, CURRENT_HANDLER.onRemoval(d, false, false));
      addFile(result, DownloadManagerDefaultPaths.DEFAULT_HANDLER.onRemoval(d, false, false));
    }
    return (File[])result.toArray(new File[result.size()]);
  }
 
  private static void addFile(ArrayList l, SaveLocationChange slc) {
    if (slc != null) {addFile(l, slc.download_location);}
  }
View Full Code Here

      location = ts.getTarget(null, ts);
      if (location != null) {
        results.add(location);
      }
    }
    return (File[])results.toArray(new File[results.size()]);
  }



    /**
 
View Full Code Here

              String checker = (String) argsList.remove(0);
              if (checker.equals(AzureusCoreSingleInstanceClient.ACCESS_STRING)) {
                if (argsList.get(0).equals("args")) {
                  argsList.remove(0);                 
                  String newargs[] = new String[argsList.size()];
                  argsList.toArray(newargs);
                  Main.processArgs(newargs, null, null);
                } else {
                  Logger.getLogger("azureus2").error("Something strange was sent to the StartServer: " + line);
                }
              } 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.