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, E e3) 

Source Link

Usage

From source file:org.sonar.plugins.fsharp.FSharpFxCopProvider.java

public static List extensions() {
    return ImmutableList.of(FSharpFxCopRulesDefinition.class, FSharpFxCopSensor.class,
            PropertyDefinition.builder(FXCOP_REPORT_PATH_PROPERTY_KEY).name("Report path")
                    .description("FxCop analysis reports to be imported").category(CATEGORY)
                    .subCategory(SUBCATEGORY).onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE).build());
}

From source file:ai.grakn.generator.CommonStrings.java

@Override
protected String generate() {
    return random.choose(ImmutableList.of("foo", "bar", "baz"));
}

From source file:org.jbpm.console.ng.gc.client.util.TaskUtils.java

public static List<String> getStatusByType(TaskType type) {
    ImmutableList<String> status = null;
    switch (type) {
    case ACTIVE:
        status = ImmutableList.of(TASK_STATUS_READY, TASK_STATUS_RESERVED, TASK_STATUS_INPROGRESS);
        break;/*w  w w  .  j  a v  a 2 s  . c  o m*/
    case GROUP:
        status = ImmutableList.of(TASK_STATUS_READY);
        break;
    case ALL:
        status = ImmutableList.of(TASK_STATUS_CREATED, TASK_STATUS_READY, TASK_STATUS_RESERVED,
                TASK_STATUS_INPROGRESS, TASK_STATUS_SUSPENDED, TASK_STATUS_FAILED, TASK_STATUS_ERROR,
                TASK_STATUS_EXITED, TASK_STATUS_OBSOLETE, TASK_STATUS_COMPLETED);
        break;
    case PERSONAL:
        status = ImmutableList.of(TASK_STATUS_INPROGRESS, TASK_STATUS_CREATED, TASK_STATUS_RESERVED);
        break;
    case ADMIN:
        status = ImmutableList.of(TASK_STATUS_READY, TASK_STATUS_INPROGRESS, TASK_STATUS_CREATED,
                TASK_STATUS_RESERVED);
        break;
    default:
        throw new IllegalStateException("Unrecognized view type '" + type + "'!");

    }
    return Lists.newArrayList(status);
}