Example usage for java.util Collection addAll

List of usage examples for java.util Collection addAll

Introduction

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

Prototype

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

Source Link

Document

Adds all of the elements in the specified collection to this collection (optional operation).

Usage

From source file:com.smash.revolance.ui.comparator.page.PageMatchMaker.java

@Override
public Collection<PageMatch> findMatch(final Collection<PageBean> pages, final PageBean page,
        PageSearchMethod... methods) throws NoMatchFound, IllegalArgumentException {
    if (pages == null) {
        throw new IllegalArgumentException("Null collection of pages to be parsed");
    }/*from  www  .j  av  a 2  s  . c  om*/
    if (page == null) {
        throw new IllegalArgumentException("Null page cannot be matched.");
    }

    Collection<PageBean> localPages = new ArrayList<PageBean>();
    localPages.addAll(pages);
    if (localPages.contains(page)) {
        pages.remove(page);
    }

    List<PageMatch> matches = getPageMatches(page, localPages, methods);

    if (matches.isEmpty()) {
        throw new NoMatchFound("Unable to find a single match.");
    } else {
        return matches;
    }
}

From source file:PropertiesSet.java

/**
 * Gets the properties in the bag.//from   w w  w.j ava  2 s .  c  o  m
 * @return un unmodifiable collection of properties
 */
public Collection<T> getProperties() {
    if (properties.isEmpty())
        return Collections.emptyList();

    Collection<T> props = new ArrayList<T>(properties.size() + 3);
    for (Set<T> propsOfType : properties.values()) {
        props.addAll(propsOfType);
    }
    return props;
}

From source file:org.simbasecurity.core.domain.repository.RuleDatabaseRepository.java

@SuppressWarnings("unchecked")
public Collection<URLRule> findURLRules(String username) {
    Query query1 = entityManager.createQuery(QUERY_URL_RULES_FOR_USER).setParameter(USERNAME, username);
    Collection<URLRule> result = query1.getResultList();
    Query query = entityManager.createQuery(QUERY_URL_RULES_FOR_GROUPUSER).setParameter(USERNAME, username);
    result.addAll(query.getResultList());
    return result;
}

From source file:com.basho.riak.client.query.BucketMapReduce.java

/**
 * Unmodifiable copy iterator view of the list of {@link KeyFilter}s for
 * this M/R operation. Does not read or write through to internal
 * BucketInput state./*  w  w  w  .  j ava 2s . co  m*/
 */
public Iterator<KeyFilter> iterator() {
    final Collection<KeyFilter> copyFilters = new LinkedList<KeyFilter>();

    synchronized (keyFiltersLock) {
        copyFilters.addAll(keyFilters);
    }

    return new UnmodifiableIterator<KeyFilter>(copyFilters.iterator());
}

From source file:com.marklogic.entityservices.tests.TestSetup.java

public void teardownClass() {
    JSONDocumentManager docMgr = _client.newJSONDocumentManager();
    Collection<String> cleanupDocuments = new ArrayList<String>();
    cleanupDocuments.addAll(getTestResourceNames("/source-documents"));
    cleanupDocuments.addAll(getTestResourceNames("/test-instances"));
    cleanupDocuments.addAll(getTestResourceNames("/json-models"));
    cleanupDocuments.addAll(getTestResourceNames("/xml-models"));

    docMgr.delete(cleanupDocuments.toArray(new String[] {}));

}

From source file:com.assemblade.opendj.model.authentication.policy.LdapPassthroughAuthenticationPolicy.java

@Override
public Collection<String> getAttributeNames() {
    Collection<String> attributeNames = super.getAttributeNames();

    attributeNames.addAll(Arrays.asList("ds-cfg-primary-remote-ldap-server", "ds-cfg-mapping-policy",
            "ds-cfg-use-password-caching", "ds-cfg-secondary-remote-ldap-server", "ds-cfg-mapped-attribute",
            "ds-cfg-mapped-search-bind-dn", "ds-cfg-mapped-search-bind-password",
            "ds-cfg-mapped-search-bind-password-property",
            "ds-cfg-mapped-search-bind-password-environment-variable",
            "ds-cfg-mapped-search-bind-password-file", "ds-cfg-mapped-search-base-dn",
            "ds-cfg-connection-timeout", "ds-cfg-trust-manager-provider", "ds-cfg-use-ssl",
            "ds-cfg-use-tcp-keep-alive", "ds-cfg-use-tcp-no-delay", "ds-cfg-ssl-protocol",
            "ds-cfg-ssl-cipher-suite", "ds-cfg-cached-password-storage-scheme", "ds-cfg-cached-password-ttl"));
    return attributeNames;
}

From source file:com.assemblade.opendj.model.ChangeLogEntry.java

@Override
public Collection<String> getAttributeNames() {
    Collection<String> attributeNames = super.getAttributeNames();
    attributeNames.addAll(new ArrayList<String>(Arrays.asList("changeNumber", "targetDN", "changeType",
            "changeTime", "changes", "newRDN", "deleteOldRDN", "newSuperior", "creatorsName")));
    return attributeNames;
}

From source file:io.hops.transaction.context.INodeAttributesContext.java

@Override
public void prepare(TransactionLocks tlm) throws TransactionContextException, StorageException {
    Collection<INodeAttributes> modified = new ArrayList<>(getModified());
    modified.addAll(getAdded());
    dataAccess.prepare(modified, getRemoved());
}

From source file:net.sourceforge.dita4publishers.impl.ditabos.DitaBoundedObjectSetImpl.java

public Collection<BosMember> getMembers() {
    Collection<BosMember> memberCol = new Vector<BosMember>();
    memberCol.addAll(this.members.values());
    return memberCol;
}

From source file:de.huberlin.wbi.hiway.common.LogParser.java

@Override
public Collection<InvocStat> getLogEntriesForTasks(Set<Long> taskIds) {
    Collection<InvocStat> stats = new LinkedList<>();
    for (long taskId : taskIds) {
        stats.addAll(getLogEntriesForTask(taskId));
    }//  www  .j  a va2s  .  c om
    return stats;
}