Example usage for java.util List addAll

List of usage examples for java.util List addAll

Introduction

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

Prototype

boolean addAll(Collection<? extends E> c);

Source Link

Document

Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).

Usage

From source file:net.sf.uadetector.OperatingSystemSampleReader.java

public static List<OperatingSystemSample> readAll() {
    final List<OperatingSystemSample> examples = new ArrayList<OperatingSystemSample>();
    examples.addAll(read("samples/ANDROID.csv"));
    examples.addAll(read("samples/BADA.csv"));
    examples.addAll(read("samples/BSD.csv"));
    examples.addAll(read("samples/IOS.csv"));
    examples.addAll(read("samples/JVM.csv"));
    examples.addAll(read("samples/MAC_OS.csv"));
    examples.addAll(read("samples/OS_X.csv"));
    examples.addAll(read("samples/SYMBIAN.csv"));
    examples.addAll(read("samples/WEBOS.csv"));
    examples.addAll(read("samples/WINDOWS.csv"));
    return examples;
}

From source file:edu.pitt.dbmi.ccd.db.specification.GroupSpecification.java

private static Predicate buildSearchSpec(Root<Group> root, CriteriaBuilder cb, Set<String> matches,
        Set<String> nots) {
    List<Predicate> predicates = new ArrayList<>(0);
    if (!isEmpty(matches)) {
        predicates.addAll(inNameOrDescription(root, cb, matches));
    }//from   w ww .  j a  v a2  s  .c  o m
    if (!isEmpty(nots)) {
        predicates.addAll(notInNameOrDescription(root, cb, nots));
    }
    return cb.and(predicates.toArray(new Predicate[predicates.size()]));
}

From source file:com.amalto.workbench.utils.FKFilterParser.java

private static List<Line> buildLine(String criteria, String[] keyNames) {
    List<Line> lines = new ArrayList<Line>();
    if (criteria != null) {
        String[] criterias = criteria.split(endSeparator);
        for (String cria : criterias) {
            String[] values = cria.split("\\$\\$");//$NON-NLS-1$
            List<String> list = new ArrayList<String>();
            list.addAll(Arrays.asList(values));
            int num = 4 - list.size();
            for (int i = 0; i < num; i++) {
                list.add("");//$NON-NLS-1$
            }/* w w w. j  av  a  2 s  .c om*/
            // filter value
            if (list.get(2) != null && list.get(2).length() > 0) {
                String value = list.get(2);
                value = value.replaceAll(quot, "\"");//$NON-NLS-1$
                list.set(2, value);
            }

            List<KeyValue> keyValues = buildKeyValue(keyNames, list.toArray(new String[list.size()]));
            Line line = new Line(keyValues);
            lines.add(line);
        }
    }
    return lines;
}

From source file:net.sourceforge.vulcan.web.XslHelper.java

public static Node getBuildHistoryAvailableColumns() throws ParserConfigurationException {
    final List<String> columns = JstlFunctions.getAllDashboardColumns(Keys.BUILD_HISTORY_COLUMNS);
    columns.addAll(JstlFunctions.getAvailableMetrics());
    return makeColumnList(columns);
}

From source file:edu.pitt.dbmi.ccd.db.specification.VocabularySpecification.java

private static Predicate buildSearchSpec(Root<Vocabulary> root, CriteriaBuilder cb, Set<String> matches,
        Set<String> nots) {
    List<Predicate> predicates = new ArrayList<>(0);
    if (!isEmpty(matches)) {
        predicates.addAll(inNameOrDescription(root, cb, matches));
    }/*from w w  w. j a v a2s.  co  m*/
    if (!isEmpty(nots)) {
        predicates.addAll(notInNameOrDescription(root, cb, nots));
    }
    return cb.and(predicates.toArray(new Predicate[predicates.size()]));
}

From source file:$.DocumentQuery.java

public static List<Document> findByTags(Set<DocumentTag> tags) {
        List<Document> results = new ArrayList<Document>();
        results.addAll(Document.findByTags(tags));
        return results;
    }//from   w w  w .  java 2 s.  com

From source file:es.emergya.consultas.IncidenciaConsultas.java

public static Object[] getCategorias(boolean hasBlankSpace) {
    List<Object> res = new LinkedList<Object>();
    if (hasBlankSpace)
        res.add("");
    res.addAll(incidenciaHome.getCategorias());
    return res.toArray(new Object[0]);
}

From source file:es.emergya.consultas.IncidenciaConsultas.java

public static Object[] getStatuses(boolean hasBlankSpace) {
    List<Object> res = new LinkedList<Object>();
    if (hasBlankSpace)
        res.add("");
    res.addAll(incidenciaHome.getStatuses());
    return res.toArray(new Object[0]);
}

From source file:com.synopsys.integration.executable.Executable.java

public static Executable create(final File workingDirectory, Map<String, String> environmentVariables,
        final String command, final List<String> arguments) {
    List<String> commandWithArguments = new ArrayList<>();
    commandWithArguments.add(command);/*from  w w w .  j  ava 2  s.  c o  m*/
    commandWithArguments.addAll(arguments);
    return new Executable(workingDirectory, environmentVariables, commandWithArguments);
}

From source file:com.dtolabs.rundeck.core.utils.OptsUtil.java

public static String join(String first, List<String> args) {
    List<String> strings = new ArrayList<String>(args.size() + 1);
    strings.add(first);/*from  w  w  w. j  av a 2s  . c  om*/
    strings.addAll(args);
    return join(strings);
}