List of usage examples for com.google.common.collect Iterables concat
public static <T> Iterable<T> concat(Iterable<? extends T> a, Iterable<? extends T> b, Iterable<? extends T> c, Iterable<? extends T> d)
From source file:com.facebook.buck.apple.AbstractAppleBundleResources.java
/** * Returns all the SourcePaths from the different types of resources. *//*from ww w .j ava 2 s .c o m*/ public Iterable<SourcePath> getAll() { return Iterables.concat(getResourceDirs(), getDirsContainingResourceDirs(), getResourceFiles(), getResourceVariantFiles()); }
From source file:org.sonar.plugins.findbugs.FindbugsProfileExporter.java
@Override public void exportProfile(RulesProfile profile, Writer writer) { try {// w w w . j a v a 2 s . c o m FindBugsFilter filter = buildFindbugsFilter( Iterables.concat(profile.getActiveRulesByRepository(FindbugsRulesDefinition.REPOSITORY_KEY), profile.getActiveRulesByRepository(FbContribRulesDefinition.REPOSITORY_KEY), profile.getActiveRulesByRepository(FindSecurityBugsRulesDefinition.REPOSITORY_KEY), profile.getActiveRulesByRepository(FindSecurityBugsJspRulesDefinition.REPOSITORY_KEY))); XStream xstream = FindBugsFilter.createXStream(); writer.append(xstream.toXML(filter)); } catch (IOException e) { throw new SonarException("Fail to export the Findbugs profile : " + profile, e); } }
From source file:org.gradle.execution.plan.TaskNode.java
@Override public Iterable<Node> getAllSuccessorsInReverseOrder() { return Iterables.concat(super.getAllSuccessorsInReverseOrder(), mustSuccessors.descendingSet(), finalizingSuccessors.descendingSet(), shouldSuccessors.descendingSet()); }
From source file:com.google.devtools.build.lib.rules.cpp.CcLinkingOutputs.java
/** * Returns a map from library identifiers to sets of LibraryToLink from this CcLinkingOutputs * which share that library identifier.// ww w. ja va 2s . co m */ public ImmutableSetMultimap<String, LibraryToLink> getLibrariesByIdentifier() { return getLibrariesByIdentifier( Iterables.concat(staticLibraries, picStaticLibraries, dynamicLibraries, executionDynamicLibraries)); }
From source file:org.sonar.java.model.expression.LambdaExpressionTreeImpl.java
@Override public Iterable<Tree> children() { boolean hasParentheses = openParenToken != null; return Iterables.concat( hasParentheses ? Collections.singletonList(openParenToken) : Collections.<Tree>emptyList(), parameters,/*from ww w.j av a 2 s. c o m*/ hasParentheses ? Collections.singletonList(closeParenToken) : Collections.<Tree>emptyList(), Lists.newArrayList(arrowToken, body)); }
From source file:com.google.template.soy.shared.internal.InternalPlugins.java
public static ImmutableMap<String, SoyPrintDirective> internalDirectiveMap(final SoyScopedData soyScopedData) { Supplier<BidiGlobalDir> bidiProvider = new Supplier<BidiGlobalDir>() { @Override/*ww w .ja va 2s .c om*/ public BidiGlobalDir get() { return soyScopedData.getBidiGlobalDir(); } }; Supplier<String> localeProvider = new Supplier<String>() { @Override public String get() { return soyScopedData.getLocale(); } }; return fromDirectives(Iterables.concat(CoreDirectives.directives(), BasicDirectives.directives(), BidiDirectives.directives(bidiProvider), I18nDirectives.directives(localeProvider))); }