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:io.druid.testing.guice.DruidTestModuleFactory.java

private static List<? extends Module> getModules() {
    return ImmutableList.of(new DruidTestModule(), new IndexingServiceFirehoseModule());
}

From source file:org.sonar.plugins.gherkin.issuesaver.CrossFileChecksIssueSaver.java

private static Collection<Class<? extends CrossFileCheckIssueSaver>> getCrossFileCheckIssueSavers() {
    return ImmutableList.of(DuplicatedFeatureNamesIssueSaver.class, DuplicatedScenarioNamesIssueSaver.class);
}

From source file:com.querydsl.core.types.expr.StringOperation.java

public static StringExpression create(Operator<? super String> op, Expression<?> one, Expression<?> two) {
    return new StringOperation(op, ImmutableList.of(one, two));
}

From source file:com.mysema.query.types.expr.BooleanOperation.java

public static BooleanExpression create(Operator<? super Boolean> op, Expression<?> one, Expression<?> two) {
    return new BooleanOperation(op, ImmutableList.of(one, two));
}

From source file:com.facebook.buck.ocaml.OcamlDescriptionEnhancer.java

public static ImmutableList<StringWithMacrosArg> toStringWithMacrosArgs(BuildTarget target,
        CellPathResolver cellPathResolver, BuildRuleResolver resolver, Iterable<StringWithMacros> flags) {
    ImmutableList.Builder<StringWithMacrosArg> args = ImmutableList.builder();
    for (StringWithMacros flag : flags) {
        args.add(StringWithMacrosArg.of(flag,
                ImmutableList.of(new LocationMacroExpander(), new ExecutableMacroExpander()), target,
                cellPathResolver, resolver));
    }// w w  w  .  j av a  2s.com
    return args.build();
}

From source file:com.facebook.presto.util.StructuralTestUtil.java

public static Block mapBlockOf(Type keyType, Type valueType, Map<?, ?> value) {
    BlockBuilder blockBuilder = new InterleavedBlockBuilder(ImmutableList.of(keyType, valueType),
            new BlockBuilderStatus(), value.size() * 2);
    for (Map.Entry<?, ?> entry : value.entrySet()) {
        appendToBlockBuilder(keyType, entry.getKey(), blockBuilder);
        appendToBlockBuilder(valueType, entry.getValue(), blockBuilder);
    }//from   w ww . ja  v a  2  s  .  c o  m
    return blockBuilder.build();
}

From source file:org.gradle.api.internal.ModelCreators.java

public static <I, C extends PolymorphicDomainObjectContainerInternal<I>> ModelCreator forPolymorphicDomainObjectContainer(
        ModelReference<? super C> modelReference, Class<I> itemClass, C container,
        ModelRuleDescriptor descriptor) {
    ModelProjection<C> identityProjection = new IdentityModelProjection<C>(modelReference.getType(), true,
            true);/*from   w ww  .  j av  a 2 s  . c  om*/
    ModelProjection<C> containerProjection = new PolymorphicDomainObjectContainerModelProjection<I, C>(
            container, itemClass);

    List<ModelProjection<C>> projections = ImmutableList.of(identityProjection, containerProjection);

    return new DefaultModelCreator<C>(modelReference.getPath(), descriptor,
            Collections.<ModelReference<?>>emptyList(), projections,
            Transformers.<C, Inputs>constant(container));
}

From source file:com.querydsl.core.types.expr.DslOperation.java

public static <D> DslExpression<D> create(Class<D> type, Operator<? super D> op, Expression<?> one,
        Expression<?> two) {
    return new DslOperation<D>(type, op, ImmutableList.of(one, two));
}

From source file:com.mysema.query.spatial.PointOperation.java

public static <D extends Point> PointOperation<D> create(Class<D> type, Operator<? super D> op,
        Expression<?> one, Expression<?> two) {
    return new PointOperation<D>(type, op, ImmutableList.of(one, two));
}

From source file:com.mysema.query.types.expr.SimpleOperation.java

public static <D> SimpleExpression<D> create(Class<D> type, Operator<? super D> op, Expression<?> one,
        Expression<?> two) {
    return new SimpleOperation<D>(type, op, ImmutableList.of(one, two));
}