List of usage examples for com.google.common.collect Iterables addAll
public static <T> boolean addAll(Collection<T> addTo, Iterable<? extends T> elementsToAdd)
From source file:org.auraframework.impl.css.theme.ThemeListImpl.java
@Override public Set<String> getVarNames() throws QuickFixException { Set<String> names = new HashSet<>(); for (DefDescriptor<ThemeDef> theme : themes) { Iterables.addAll(names, theme.getDef().getAllNames()); }/*from ww w. j a v a2s. c o m*/ names.addAll(dynamicVars.rowKeySet()); return names; }
From source file:com.zimbra.soap.admin.type.QueueQuery.java
public void setFields(Iterable<QueueQueryField> fields) { this.fields.clear(); if (fields != null) { Iterables.addAll(this.fields, fields); }/*from w w w. j av a 2 s . co m*/ }
From source file:brooklyn.util.task.system.internal.AbstractProcessTaskFactory.java
@Override public T add(Iterable<String> commandsToAdd) { Iterables.addAll(this.commands, commandsToAdd); return self(); }
From source file:com.zimbra.soap.admin.type.BackupAccountQueryInfo.java
public void setBackups(Iterable<BackupAccountQueryBackupInfo> backups) { this.backups.clear(); if (backups != null) { Iterables.addAll(this.backups, backups); }/*from ww w.j a v a2 s . com*/ }
From source file:com.zimbra.soap.mail.message.GetMiniCalResponse.java
public void setBusyDates(Iterable<String> busyDates) { this.busyDates.clear(); if (busyDates != null) { Iterables.addAll(this.busyDates, busyDates); }/*from www. ja v a 2 s . c o m*/ }
From source file:hudson.plugins.depgraph_view.model.graph.GraphCalculator.java
private void extendGraph(DependencyGraph graph, Iterable<ProjectNode> fromProjects) { List<Edge> newEdges = Lists.newArrayList(); for (ProjectNode projectNode : fromProjects) { AbstractProject<?, ?> project = projectNode.getProject(); if (project.hasPermission(Item.READ)) { for (EdgeProvider edgeProvider : edgeProviders) { Iterables.addAll(newEdges, edgeProvider.getEdgesIncidentWith(project)); }/*from w ww. j a va2s . co m*/ } } Set<ProjectNode> newProj = graph.addEdgesWithNodes(newEdges); if (!newProj.isEmpty()) { extendGraph(graph, newProj); } }
From source file:org.richfaces.ui.validation.validator.ClientOnlyScript.java
public ClientOnlyScript(LibraryScriptFunction clientSideConverterScript, Collection<? extends LibraryScriptFunction> validatorScripts, String onvalid, String oninvalid) { super();//from www . ja va 2 s. c om this.converter = clientSideConverterScript; this.validators = ImmutableList.copyOf(validatorScripts); LinkedHashSet<ResourceKey> resources = Sets.newLinkedHashSet(); resources.add(CSV_RESOURCE); if (null != converter) { Iterables.addAll(resources, converter.getResources()); } for (LibraryScriptFunction scriptString : validators) { Iterables.addAll(resources, scriptString.getResources()); } this.resources = ImmutableSet.copyOf(resources); this.onvalid = onvalid; this.oninvalid = oninvalid; }
From source file:com.android.idegen.AggregatedModule.java
@Override protected List<File> getIntermediatesDirs() { List<File> result = Lists.newArrayList(); for (Module module : modules) { Iterables.addAll(result, module.getIntermediatesDirs()); }/*from ww w . jav a 2s . c o m*/ return result; }
From source file:com.googlecode.blaisemath.style.Markers.java
/** * Retrieve list of available shapes.//w w w .j ava 2 s.c om * @return list of marker constants */ public static List<Marker> getAvailableMarkers() { if (MARKER_CACHE.isEmpty()) { ServiceLoader<Marker> loader = ServiceLoader.load(Marker.class); Iterables.addAll(MARKER_CACHE, loader); } return Collections.unmodifiableList(MARKER_CACHE); }
From source file:org.gradle.api.internal.tasks.compile.incremental.ClassSetAnalysisUpdater.java
public void updateAnalysis(JavaCompileSpec spec) { Timer clock = Timers.startTimer(); Set<File> baseDirs = Sets.newLinkedHashSet(); baseDirs.add(spec.getDestinationDir()); Iterables.addAll(baseDirs, Iterables.filter(spec.getCompileClasspath(), IS_CLASS_DIRECTORY)); ClassFilesAnalyzer analyzer = new ClassFilesAnalyzer(this.analyzer, fileHasher); for (File baseDir : baseDirs) { fileOperations.fileTree(baseDir).visit(analyzer); }//ww w . j a va 2s . co m ClassSetAnalysisData data = analyzer.getAnalysis(); stash.put(data); LOG.info("Class dependency analysis for incremental compilation took {}.", clock.getElapsed()); }