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:org.jclouds.googlecloudstorage.config.GoogleCloudStorageOAuthScopes.java

public static GoogleCloudStorageOAuthScopes create() {
    return new AutoValue_GoogleCloudStorageOAuthScopes( //
            OAuthScopes.ReadOrWriteScopes.create( //
                    "https://www.googleapis.com/auth/devstorage.read_only", //
                    "https://www.googleapis.com/auth/devstorage.read_write"), //
            ImmutableList.of("https://www.googleapis.com/auth/devstorage.full_control") //
    );/*from  ww  w  .j a v  a 2 s  . c  o  m*/
}

From source file:com.google.idea.blaze.base.projectview.section.sections.TextBlock.java

/** A text block that is a single newline */
public static TextBlock newLine() {
    return new TextBlock(ImmutableList.of(""));
}

From source file:ro.cosu.vampires.server.actors.messages.workload.QueryWorkload.java

public static QueryWorkload create(String resourceId, User user) {
    return new AutoValue_QueryWorkload(ImmutableList.of(resourceId), user);
}

From source file:com.google.javascript.refactoring.ErrorToFixMapper.java

public static List<SuggestedFix> getFixesForJsError(JSError error, AbstractCompiler compiler) {
    SuggestedFix fix = getFixForJsError(error, compiler);
    if (fix != null) {
        return ImmutableList.of(fix);
    }/*from   ww w .j av  a 2 s  .c om*/
    switch (error.getType().key) {
    case "JSC_IMPLICITLY_NULLABLE_JSDOC":
        return getFixesForImplicitlyNullableJsDoc(error);
    default:
        return ImmutableList.of();
    }
}

From source file:com.google.api.tools.framework.model.FieldSelector.java

/**
 * Construct a field selector for the given field.
 *///w w w .j  a v a 2s  .  c  o  m
public static FieldSelector of(Field field) {
    return new FieldSelector(ImmutableList.of(field));
}

From source file:com.spectralogic.ds3autogen.java.test.helpers.Ds3ResponseCodeFixtureTestHelper.java

/**
 * Creates a populated Ds3ResponseCode with a null response type
 *///from www .  jav a2  s  .  c o  m
public static Ds3ResponseCode createPopulatedNullResponseCode() {
    return new Ds3ResponseCode(200, ImmutableList.of(new Ds3ResponseType("null", null)));
}

From source file:com.spotify.heroic.metric.WriteMetric.java

public static WriteMetric error(final RequestError error) {
    return new WriteMetric(ImmutableList.of(error), ImmutableList.of());
}

From source file:com.wrmsr.wava.java.lang.JQualifiedName.java

public static JQualifiedName of(String name) {
    return new JQualifiedName(ImmutableList.of(JName.of(name)));
}

From source file:com.querydsl.core.types.template.DslTemplate.java

public static <T> DslExpression<T> create(Class<? extends T> type, String template, Object one) {
    return new DslTemplate<T>(type, TemplateFactory.DEFAULT.create(template), ImmutableList.of(one));
}

From source file:io.crate.operation.collect.RowsCollector.java

public static RowsCollector single(Row row, RowReceiver rowDownstream) {
    return new RowsCollector(rowDownstream, ImmutableList.of(row));
}