Example usage for java.util LinkedList LinkedList

List of usage examples for java.util LinkedList LinkedList

Introduction

In this page you can find the example usage for java.util LinkedList LinkedList.

Prototype

public LinkedList() 

Source Link

Document

Constructs an empty list.

Usage

From source file:carrental.model.reservation.Car.java

public Car() {
    reservations = new LinkedList<>();
}

From source file:de.helmholtz_muenchen.ibis.ngs.vcfmerger.VCFMerger.java

public static String mergeVCFs(String GATK, String RefGenome, String Infolder, String Outfolder, String Regex,
        String GenotypeMergeOption, final ExecutionContext exec, NodeLogger logger, String OUTFILETAG)
        throws InvalidSettingsException {

    LinkedList<String> Files2Merge = new LinkedList<String>();
    de.helmholtz_muenchen.ibis.utils.ngs.FileSearch.searchWithV(Infolder, Regex, Files2Merge);
    String OUTFILE = merge_vcfs(GATK, RefGenome, Files2Merge, Outfolder, GenotypeMergeOption, exec, logger,
            OUTFILETAG);/*from www  .j  a  va2 s .c  o  m*/
    return OUTFILE;
}

From source file:WhatsApp.User.java

public User(String _userName, String _phoneNumber) {
    this._userName = _userName;
    this._phoneNumber = _phoneNumber;
    this._massegesQueue = new LinkedList();
    this._cookie = new BasicClientCookie((_userName + "Cookie"), _userName);
    this.groups = new HashMap<>();
}

From source file:com.starit.diamond.utils.AppNameUtils.java

public static String[] getAllAppNames(String[] excludes) {
    File classpath = getClasspath();
    File deployDir = classpath.getParentFile();
    List<String> appNames = new LinkedList<String>();
    for (String suffix : SUFFIXS) {
        File[] files = listFiles(deployDir, suffix, excludes);
        addFilesToAppNames(files, appNames, suffix);
    }//  w  ww .j  ava 2  s .  c  o  m
    return appNames.toArray(new String[appNames.size()]);
}

From source file:edu.iu.daal_sgd.SGDUtil.java

public static Int2ObjectOpenHashMap<VRowCol> loadTestVHMap(String testFilePath, Configuration configuration,
        int numThreads) {
    List<String> testFilePaths = new LinkedList<>();
    Path path = new Path(testFilePath);
    try {//from w ww .  java  2 s. com
        FileSystem fs = path.getFileSystem(configuration);
        RemoteIterator<LocatedFileStatus> iterator = fs.listFiles(path, true);
        while (iterator.hasNext()) {
            String name = iterator.next().getPath().toUri().toString();
            testFilePaths.add(name);
        }
    } catch (IOException e) {
        LOG.error("Fail to get test files", e);
    }
    VStore testVStore = new VStore(testFilePaths, numThreads, configuration);
    testVStore.load(true, false);
    return testVStore.getVHMap();
}

From source file:com.autonomy.aci.client.annotations.Path.java

Path(final String pathString) {
    this.pathComponents = new LinkedList<>();

    final String pathComponentString;

    if (pathString.startsWith(START_TOKEN)) {
        this.pathComponents.addFirst(START_TOKEN);
        pathComponentString = pathString.substring(2);
    } else {//  w  w  w .ja  v a  2 s  .  c o m
        pathComponentString = pathString;
    }

    if (pathComponentString.contains(START_TOKEN)) {
        throw new IllegalArgumentException("Supplied path string " + pathString + " contains " + START_TOKEN
                + " at an index other than 0");
    }

    final String[] pathComponents = pathComponentString.split("/");

    for (final String pathComponent : pathComponents) {
        if (!pathComponent.isEmpty()) {
            this.pathComponents.add(pathComponent);
        }
    }
}

From source file:ec.edu.espe.distribuidas.facturacion.socket.estrucMsj.tipoDato.TextV.java

public TextV(String trama) {
    this.trama = trama;
    this.longitud = -1;
    datos = new LinkedList<>();
}

From source file:net.decix.jatlasx.ripe.atlas.api.handler.TracerouteHandler.java

public List<TraceroutePath> handleResponse(String jsonString) {

    List<TraceroutePath> listOfPaths = new LinkedList<TraceroutePath>();

    JSONArray tracesListArray = new JSONArray(jsonString);

    for (int i = 0; i < tracesListArray.length(); i++) {
        JSONObject results = (JSONObject) tracesListArray.get(i);
        IpAddress source = null;/* w w  w.j a va2 s  . co m*/
        IpAddress destination = null;
        try {
            source = new IpAddress((String) results.get("from"));
            destination = new IpAddress((String) results.get("dst_name"));
        } catch (UnknownHostException e) {
            String errorMsg = "Could not create IP-addresses";
            System.err
                    .println(e.getClass().getName() + ":" + errorMsg + " (" + this.getClass().getName() + ")");
        }
        TracesHandler handler = new TracesHandler();
        String resultString = results.get("result").toString();
        List<IpAddress> trace = handler.handleResponse(resultString);

        TraceroutePath path = new TraceroutePath(source, destination, trace);
        listOfPaths.add(path);
    }
    return listOfPaths;
}

From source file:edu.iu.daal_cov.COVUtil.java

public static List<double[]> loadPoints(List<String> fileNames, int pointsPerFile, int cenVecSize,
        Configuration conf, int numThreads) {
    long startTime = System.currentTimeMillis();
    List<PointLoadTask> tasks = new LinkedList<>();
    List<double[]> arrays = new LinkedList<double[]>();
    for (int i = 0; i < numThreads; i++) {
        tasks.add(new PointLoadTask(pointsPerFile, cenVecSize, conf));
    }/*from www.j  a  v a  2s .co  m*/
    DynamicScheduler<String, double[], PointLoadTask> compute = new DynamicScheduler<>(tasks);
    for (String fileName : fileNames) {
        compute.submit(fileName);
    }
    compute.start();
    compute.stop();
    while (compute.hasOutput()) {
        double[] output = compute.waitForOutput();
        if (output != null) {
            arrays.add(output);
        }
    }
    long endTime = System.currentTimeMillis();
    System.out
            .println("File read (ms): " + (endTime - startTime) + ", number of point arrays: " + arrays.size());
    return arrays;
}

From source file:edu.iu.daal_nn.NNUtil.java

public static List<List<double[]>> loadPoints(List<String> fileNames, int pointsPerFile, int cenVecSize,
        Configuration conf, int numThreads) {
    long startTime = System.currentTimeMillis();
    List<PointLoadTask> tasks = new LinkedList<>();
    List<List<double[]>> arrays = new LinkedList<List<double[]>>();
    for (int i = 0; i < numThreads; i++) {
        tasks.add(new PointLoadTask(pointsPerFile, cenVecSize, conf));
    }//from   w  w  w  . j a  v a  2s  .c o m
    DynamicScheduler<String, List<double[]>, PointLoadTask> compute = new DynamicScheduler<>(tasks);
    for (String fileName : fileNames) {
        compute.submit(fileName);
    }
    compute.start();
    compute.stop();
    while (compute.hasOutput()) {
        List<double[]> output = compute.waitForOutput();
        if (output != null) {
            arrays.add(output);
        }
    }
    long endTime = System.currentTimeMillis();
    System.out
            .println("File read (ms): " + (endTime - startTime) + ", number of point arrays: " + arrays.size());
    return arrays;
}