List of usage examples for java.util Collection addAll
boolean addAll(Collection<? extends E> c);
From source file:modalLogic.tableau.World.java
/** * Returns the positive literals of this world. * * @return the positive literals of this world *//*from www .j av a2s . c om*/ public Collection<LabelledFormula<P>> getPositiveLiterals() { Collection<LabelledFormula<P>> pos = positive.values(); pos.addAll(posconstants.values()); return pos; }
From source file:modalLogic.tableau.World.java
/** * Returns the negated literals of this world. * * @return the negated literals of this world *//* w ww.jav a 2 s . co m*/ public Collection<LabelledFormula<P>> getNegativeLiterals() { Collection<LabelledFormula<P>> neg = negative.values(); neg.addAll(negconstants.values()); return neg; }
From source file:com.marklogic.entityservices.tests.TestSetup.java
public HashSet<String> loadExtraFiles(String dirName, String filePattern) { HashSet<String> sourceFileUris = new HashSet<String>(); JSONDocumentManager docMgr = _client.newJSONDocumentManager(); DocumentWriteSet writeSet = docMgr.newWriteSet(); //Collection<File> sourceFiles = getTestResources("/source-documents"); //Collection<File> testDocuments = getTestResources("/test-instances"); Collection<File> testDocuments = getTestResources(dirName); Collection<File> extraDocuments = new ArrayList<File>(); extraDocuments.addAll(testDocuments); for (File f : extraDocuments) { if (f.getName().startsWith(".")) { continue; }/* www. j av a 2 s .c o m*/ ; if (!(f.getName().endsWith(".json") || f.getName().endsWith(".xml"))) { continue; } ; logger.info("Loading " + f.getName()); writeSet.add(f.getName(), new FileHandle(f)); sourceFileUris.add(f.getName()); } docMgr.write(writeSet); return sourceFileUris; }
From source file:com.assemblade.server.model.Group.java
@Override public Collection<String> getAttributeNames() { Collection<String> attributeNames = super.getAttributeNames(); attributeNames.addAll( Arrays.asList("cn", "businessCategory", "description", "aclRights", "aci", "member", "isMemberOf")); return attributeNames; }
From source file:eu.cloud4soa.frontend.commons.server.security.C4sAuthenticationProvider.java
@Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { List<User> users = userRepository.findBy("username", username); if (users.isEmpty()) throw new UsernameNotFoundException("User '" + username + "' not found."); User user = users.get(0);//from w w w. ja v a 2s .c o m Collection<GrantedAuthority> authorities = new HashSet<GrantedAuthority>(); if (C4sSubject.SUPER_USER.equals(username)) { authorities.addAll(AuthorityUtils.createAuthorityList(UserModel.USER_ROLES)); } else if ("developer".equals(user.getUsertype().getName())) { authorities.addAll(AuthorityUtils.createAuthorityList(C4sSubject.USER_TYPE_DEVELOPER)); } else if ("paasprovider".equals(user.getUsertype().getName())) { authorities.addAll(AuthorityUtils.createAuthorityList(C4sSubject.USER_TYPE_PROVIDER)); } UserModel userModel = "developer".equals(user.getUsertype().getName()) ? developerUserRepository.findByUriId(user.getUriID()) : providerUserRepository.findByUriId(user.getUriID()); if (userModel != null) for (String role : UserModel.USER_ROLES) if (Boolean.TRUE.equals(userModel.get(role))) authorities.addAll(AuthorityUtils.createAuthorityList(role)); return new org.springframework.security.core.userdetails.User(username, user.getPassword(), authorities); }
From source file:de.iew.stagediver.fx.eventbus.services.impl.EventBusImpl.java
public void fireEvent(Event event) { final String topic = event.getTopic(); final Collection<AnnotatedObserver> observers = getOrCreateObserversForTopic(topic); observers.addAll(getOrCreateObserversForTopic(Topic.ALL_TOPICS)); for (AnnotatedObserver observer : observers) { try {/*from ww w .java2 s . com*/ notifyIfInPlatformThread(observer, event); notifyDefault(observer, event); } catch (Throwable throwable) { // TODO we should notify someone about this error...new service (EventBusErrorService) log.error("Exception notifying observer {} with event {}", observer, event, throwable); } } }
From source file:com.aw.core.dao.bean.meta.BeanMetaInfo.java
public Collection<ColumnInfo> getAllColumns() { Collection<ColumnInfo> collection = new ArrayList<ColumnInfo>(); collection.addAll(idColumnsMap.values()); collection.addAll(nonIdColumnsMap.values()); return collection; }
From source file:com.codecrate.shard.transfer.FileExtensionObjectImporterResolver.java
public Collection getSupportedFileExtensions() { Collection extensions = new ArrayList(); Iterator it = importers.iterator(); while (it.hasNext()) { ObjectImporter importer = (ObjectImporter) it.next(); extensions.addAll(importer.getSupportedFileExtensions()); }/*from ww w . j a v a 2 s . co m*/ return extensions; }
From source file:functionaltests.workflow.TestXMLTransformer.java
@Test public void testXMLTransformer() throws Throwable { File folder = new File(jobDescriptorsFolder.toURI()); Collection<File> testJobDescrFiles = FileUtils.listFiles(folder, new String[] { "xml" }, true); File samplesJobDescrFiles = new File(System.getProperty("pa.scheduler.home") + File.separator + "samples" + File.separator + "workflows"); log(samplesJobDescrFiles.getAbsolutePath()); Collection<File> samples = FileUtils.listFiles(samplesJobDescrFiles, new String[] { "xml" }, true); samples.addAll(testJobDescrFiles); log("Treating " + samples.size() + " job descriptors."); for (File file : samples) { // skip descriptor files which are there to test invalid job description if (file.getName().contains("invalid")) { continue; }//from w ww . ja va 2 s . c o m try { transformAndCompare(file); } catch (Exception e) { e.printStackTrace(); throw new Exception("An exception occured while treating the file " + file.getAbsolutePath(), e); } } }
From source file:de.huberlin.wbi.hiway.common.LogParser.java
private Collection<InvocStat> getLogEntriesForTask(long taskId) { Collection<InvocStat> stats = new LinkedList<>(); for (String hostName : getHostNames()) { stats.addAll(getLogEntriesForTaskOnHostSince(taskId, hostName, 0l)); }/*from ww w . j av a2s . c om*/ return stats; }