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 e1, E e2) 

Source Link

Usage

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

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

From source file:com.spectralogic.ds3autogen.testutil.Ds3AnnotationMarshaledNameFixture.java

public static Ds3Annotation createNonCustomMarshaledNameAnnotation() {
    return new Ds3Annotation("com.spectralogic.util.bean.lang.SortBy",
            ImmutableList.of(
                    new Ds3AnnotationElement("Direction", "ASCENDING",
                            "com.spectralogic.util.bean.lang.SortBy$Direction"),
                    new Ds3AnnotationElement("Value", "3", "java.lang.Integer")));
}

From source file:com.google.javascript.jscomp.ModulesTestUtils.java

static void testModulesError(CompilerTestCase test, String input, DiagnosticType error) {
    ImmutableList<SourceFile> inputs = ImmutableList.of(SourceFile.fromCode("other.js", ""),
            SourceFile.fromCode("testcode.js", input));
    test.testError(inputs, error);//from w  w  w.  j  av  a  2 s  .  co  m
}

From source file:com.mysema.query.types.template.SimpleTemplate.java

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

From source file:com.google.devtools.build.android.desugar.testdata.java8.DefaultInterfaceWithLambda.java

public default List<String> defaultWithLambda() {
    return ImmutableList.of(0, 1).stream().map(i -> i == 0 ? ZERO : String.valueOf(i))
            .collect(Collectors.toList());
}

From source file:org.sonar.plugins.scm.jazzrtc.JazzRtcConfiguration.java

public static List<PropertyDefinition> getProperties() {
    return ImmutableList.of(
            PropertyDefinition.builder(USER_PROP_KEY).name("Username")
                    .description("Username to be used for Jazz RTC authentication").type(PropertyType.STRING)
                    .onQualifiers(Qualifiers.PROJECT).category(CoreProperties.CATEGORY_SCM)
                    .subCategory(CATEGORY_JAZZ).index(0).build(),
            PropertyDefinition.builder(PASSWORD_PROP_KEY).name("Password")
                    .description("Password to be used for Jazz RTC authentication").type(PropertyType.PASSWORD)
                    .onQualifiers(Qualifiers.PROJECT).category(CoreProperties.CATEGORY_SCM)
                    .subCategory(CATEGORY_JAZZ).index(1).build());
}

From source file:io.crate.metadata.FunctionIdent.java

public static FunctionIdent of(String name, DataType type1, DataType type2) {
    return new FunctionIdent(name, ImmutableList.of(type1, type2));
}

From source file:org.onosproject.cli.UpDownCompleter.java

@Override
public List<String> choices() {
    return ImmutableList.of(UP, DOWN);
}

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

public static <T extends Enum<T>> EnumExpression<T> create(Class<T> type, String template, Object one,
        Object two) {//from  ww  w .ja va  2s. c o m
    return new EnumTemplate<T>(type, TemplateFactory.DEFAULT.create(template), ImmutableList.of(one, two));
}

From source file:org.onosproject.cli.StartStopCompleter.java

@Override
public List<String> choices() {
    return ImmutableList.of(START, STOP);
}