Example usage for com.google.common.collect ImmutableList of

List of usage examples for com.google.common.collect ImmutableList of

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableList of.

Prototype

public static <E> ImmutableList<E> of(E element) 

Source Link

Usage

From source file:io.prestosql.plugin.cassandra.CassandraPlugin.java

@Override
public Iterable<ConnectorFactory> getConnectorFactories() {
    return ImmutableList.of(new CassandraConnectorFactory("cassandra"));
}

From source file:com.spotify.heroic.metadata.WriteMetadata.java

public static Transform<Throwable, WriteMetadata> shardError(final ClusterShard c) {
    return e -> new WriteMetadata(ImmutableList.of(ShardError.fromThrowable(c, e)), ImmutableList.of());
}

From source file:com.spectralogic.dsbrowser.gui.components.license.LicensePresenter.java

private static ImmutableList<LicenseModel> getModels() {
    return ImmutableList.of(new LicenseModel(Constants.LIBRARY_NAME, Constants.LICENSE));
}

From source file:com.facebook.presto.kudu.KuduPlugin.java

@Override
public Iterable<ConnectorFactory> getConnectorFactories() {
    return ImmutableList.of(new KuduConnectorFactory());
}

From source file:com.facebook.presto.plugin.memory.MemoryPlugin.java

public Iterable<ConnectorFactory> getConnectorFactories() {
    return ImmutableList.of(new MemoryConnectorFactory());
}

From source file:io.prestosql.plugin.blackhole.BlackHolePlugin.java

@Override
public Iterable<ConnectorFactory> getConnectorFactories() {
    return ImmutableList.of(new BlackHoleConnectorFactory());
}

From source file:org.apache.james.mailbox.cassandra.mail.utils.FlagsUpdateStageResult.java

public static FlagsUpdateStageResult fail(MessageUid uid) {
    return new FlagsUpdateStageResult(ImmutableList.of(uid), ImmutableList.of());
}

From source file:com.facebook.presto.localfile.LocalFilePlugin.java

@Override
public Iterable<ConnectorFactory> getConnectorFactories() {
    return ImmutableList.of(new LocalFileConnectorFactory());
}

From source file:com.google.devtools.build.lib.skyframe.PatternExpandingError.java

public static PatternExpandingError skipped(String term, String message) {
    return new PatternExpandingError(ImmutableList.of(term), message, true);
}

From source file:com.google.devtools.build.lib.rules.android.MergedAndroidAssets.java

static MergedAndroidAssets mergeFrom(AndroidDataContext dataContext, ParsedAndroidAssets parsed,
        AssetDependencies deps) throws InterruptedException {

    Artifact mergedAssets = dataContext.createOutputArtifact(AndroidRuleClasses.ANDROID_ASSETS_ZIP);

    BusyBoxActionBuilder builder = BusyBoxActionBuilder.create(dataContext, "MERGE_ASSETS");
    if (dataContext.getAndroidConfig().throwOnResourceConflict()) {
        builder.addFlag("--throwOnAssetConflict");
    }/*from   w ww.  j  a  v  a 2  s  .  c  o  m*/

    builder.addOutput("--assetsOutput", mergedAssets)
            .addInput("--primaryData", AndroidDataConverter.MERGABLE_DATA_CONVERTER.map(parsed),
                    Iterables.concat(parsed.getAssets(), ImmutableList.of(parsed.getSymbols())))
            .addTransitiveFlag("--directData", deps.getDirectParsedAssets(),
                    AndroidDataConverter.MERGABLE_DATA_CONVERTER)
            .addTransitiveFlag("--data", deps.getTransitiveParsedAssets(),
                    AndroidDataConverter.MERGABLE_DATA_CONVERTER)
            .addTransitiveInputValues(deps.getTransitiveAssets())
            .addTransitiveInputValues(deps.getTransitiveSymbols())
            .buildAndRegister("Merging Android assets", "AndroidAssetMerger");

    return of(parsed, mergedAssets, deps);
}