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:com.yahoo.yqlplus.engine.sources.InnerSource.java

@Query
@TimeoutBudget(minimumMilliseconds = 5, maximumMilliseconds = 100)
public List<Person> scan(@TimeoutMilliseconds long timeoutMs) {
    Assert.assertTrue(timeoutMs <= 100, "timeoutBudget <= 100");
    // checking minimum is dodgy and leads to failures
    return ImmutableList.of(new Person("1", "joe", 1));
}

From source file:com.mozilla.presto.hyperloglog.HyperLogLogPlugin.java

@Override
public Iterable<Type> getTypes() {
    return ImmutableList.of(HyperLogLogType.HYPER_LOG_LOG);
}

From source file:io.prestosql.plugin.atop.AtopPlugin.java

@Override
public Iterable<ConnectorFactory> getConnectorFactories() {
    return ImmutableList.of(new AtopConnectorFactory(AtopProcessFactory.class, getClassLoader()));
}

From source file:se.omegapoint.facepalm.application.CommercialService.java

public List<Commercial> getCommercials() {
    return ImmutableList.of(new Commercial("Red dead redemption", "images/commercials/reddead.jpg"));
}

From source file:com.teradata.functions.ExamplePlugin.java

@Override
public <T> List<T> getServices(Class<T> type) {
    if (type == FunctionFactory.class) {
        return ImmutableList.of(type.cast(new ExampleFunctionFactory()));
    }//from w  w w  .  ja va2s  .  c  o  m
    return ImmutableList.of();
}

From source file:com.google.googlejavaformat.FormattingError.java

public FormattingError(FormatterDiagnostic diagnostic) {
    this(ImmutableList.of(diagnostic));
}

From source file:com.google.devtools.build.lib.buildeventstream.ProgressEvent.java

/** Create a regular progress update with the given running number. */
public static BuildEvent progressUpdate(int number) {
    BuildEventId id = BuildEventId.progressId(number);
    BuildEventId next = BuildEventId.progressId(number + 1);
    return new ProgressEvent(id, ImmutableList.of(next));
}

From source file:com.spotify.heroic.ingestion.Ingestion.java

public static Ingestion of(long duration) {
    return of(ImmutableList.of(duration));
}

From source file:de.flapdoodle.guava.functions.ValueToCollection.java

public java.util.Collection<? extends V> apply(V input) {
    return ImmutableList.of(input);
}

From source file:com.facebook.presto.plugin.blackhole.BlackHolePlugin.java

@Override
public <T> List<T> getServices(Class<T> type) {
    if (type == ConnectorFactory.class) {
        return ImmutableList.of(type.cast(new BlackHoleConnectorFactory()));
    }//w  w w.j ava2s .c om
    return ImmutableList.of();
}