Example usage for com.google.common.collect ImmutableSet of

List of usage examples for com.google.common.collect ImmutableSet of

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableSet of.

Prototype

public static <E> ImmutableSet<E> of(E element) 

Source Link

Usage

From source file:com.facebook.presto.AbstractTestIndexedQueries.java

protected AbstractTestIndexedQueries() {
    // Generate the indexed data sets
    this.indexSpec = new TpchIndexSpec.Builder()
            .addIndex("orders", TpchMetadata.TINY_SCALE_FACTOR, ImmutableSet.of("orderkey"))
            .addIndex("orders", TpchMetadata.TINY_SCALE_FACTOR, ImmutableSet.of("orderkey", "orderstatus"))
            .addIndex("orders", TpchMetadata.TINY_SCALE_FACTOR, ImmutableSet.of("orderkey", "custkey")).build();
}

From source file:com.google.idea.blaze.ijwb.android.BlazeAndroidLiteSyncPlugin.java

@Override
public Set<LanguageClass> getSupportedLanguagesInWorkspace(WorkspaceType workspaceType) {
    switch (workspaceType) {
    case ANDROID:
    case JAVA://from w  w  w. j  av a 2 s.  c  o m
        return ImmutableSet.of(LanguageClass.ANDROID);
    default:
        return ImmutableSet.of();
    }
}

From source file:edu.umd.cs.psl.model.atom.AtomEvent.java

public Set<AtomEvent> subsumes() {
    return ImmutableSet.of(this);
}

From source file:org.elasticsearch.search.highlight.HighlightUtils.java

static List<Object> loadFieldValues(SearchContextHighlight.Field field, FieldMapper<?> mapper,
        SearchContext searchContext, FetchSubPhase.HitContext hitContext) throws IOException {
    //percolator needs to always load from source, thus it sets the global force source to true
    boolean forceSource = searchContext.highlight().forceSource(field);
    List<Object> textsToHighlight;
    if (!forceSource && mapper.fieldType().stored()) {
        CustomFieldsVisitor fieldVisitor = new CustomFieldsVisitor(ImmutableSet.of(mapper.names().indexName()),
                false);/*  www  .j  a va 2  s  .c o  m*/
        hitContext.reader().document(hitContext.docId(), fieldVisitor);
        textsToHighlight = fieldVisitor.fields().get(mapper.names().indexName());
        if (textsToHighlight == null) {
            // Can happen if the document doesn't have the field to highlight
            textsToHighlight = ImmutableList.of();
        }
    } else {
        SearchLookup lookup = searchContext.lookup();
        lookup.setNextReader(hitContext.readerContext());
        lookup.setNextDocId(hitContext.docId());
        textsToHighlight = lookup.source().extractRawValues(mapper.names().sourcePath());
    }
    assert textsToHighlight != null;
    return textsToHighlight;
}

From source file:com.facebook.presto.sql.parser.StatementSplitter.java

public StatementSplitter(String sql) {
    this(sql, ImmutableSet.of(";"));
}

From source file:com.facebook.buck.httpserver.TraceHandlerDelegate.java

TraceHandlerDelegate(TracesHelper tracesHelper) {
    super(ImmutableSet.of("trace.soy"));
    this.tracesHelper = Preconditions.checkNotNull(tracesHelper);
}

From source file:com.facebook.presto.raptor.RaptorSystemTablesFactory.java

public Set<SystemTable> get() {
    return ImmutableSet.of(new ShardMetadataSystemTable(dbi));
}

From source file:org.jclouds.cloudstack.options.ListAlertsOptions.java

public ListAlertsOptions id(String id) {
    this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
    return this;
}

From source file:com.facebook.presto.execution.QueryRunnerUtil.java

public static void waitForQueryState(DistributedQueryRunner queryRunner, QueryId queryId,
        QueryState expectedQueryState) throws InterruptedException {
    waitForQueryState(queryRunner, queryId, ImmutableSet.of(expectedQueryState));
}

From source file:org.eclipse.viatra.query.patternlanguage.emf.types.judgements.TypeConformJudgement.java

@Override
public Set<Expression> getDependingExpressions() {
    return ImmutableSet.of(conformsTo);
}