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

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

Introduction

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

Prototype

public static <K, V> ImmutableSetMultimap<K, V> of(K k1, V v1) 

Source Link

Document

Returns an immutable multimap containing a single entry.

Usage

From source file:com.facebook.buck.java.FakeJavaLibrary.java

@Override
public ImmutableSetMultimap<JavaLibrary, Path> getTransitiveClasspathEntries() {
    return ImmutableSetMultimap.of((JavaLibrary) this, getPathToOutputFile());
}

From source file:com.facebook.buck.features.python.PrebuiltPythonLibrary.java

@Override
public PythonPackageComponents getPythonPackageComponents(PythonPlatform pythonPlatform,
        CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder) {
    // TODO(mikekap): Allow varying sources by cxx platform (in cases of prebuilt
    // extension modules).
    return PythonPackageComponents.of(ImmutableMap.of(), ImmutableMap.of(), ImmutableMap.of(),
            ImmutableSetMultimap.of(Paths.get(""), Objects.requireNonNull(getSourcePathToOutput())),
            Optional.empty());/*  ww w .j  a  v a  2s.  c  o  m*/
}

From source file:org.jetbrains.jet.lang.resolve.calls.smartcasts.DelegatingDataFlowInfo.java

@Override
@NotNull// w  w w.j  av a 2 s.  co m
public DataFlowInfo establishSubtyping(@NotNull DataFlowValue value, @NotNull JetType type) {
    if (value.getType().equals(type))
        return this;
    if (getPossibleTypes(value).contains(type))
        return this;
    ImmutableMap<DataFlowValue, Nullability> newNullabilityInfo = type.isNullable() ? EMPTY_NULLABILITY_INFO
            : ImmutableMap.of(value, NOT_NULL);
    SetMultimap<DataFlowValue, JetType> newTypeInfo = ImmutableSetMultimap.of(value, type);
    return new DelegatingDataFlowInfo(this, newNullabilityInfo, newTypeInfo);
}

From source file:org.jetbrains.kotlin.resolve.calls.smartcasts.DelegatingDataFlowInfo.java

@Override
@NotNull/*  w w  w. j  a  v a 2s.c  o m*/
public DataFlowInfo establishSubtyping(@NotNull DataFlowValue value, @NotNull KotlinType type) {
    if (value.getType().equals(type))
        return this;
    if (getPossibleTypes(value).contains(type))
        return this;
    ImmutableMap<DataFlowValue, Nullability> newNullabilityInfo = type.isMarkedNullable()
            ? EMPTY_NULLABILITY_INFO
            : ImmutableMap.of(value, NOT_NULL);
    SetMultimap<DataFlowValue, KotlinType> newTypeInfo = ImmutableSetMultimap.of(value, type);
    return new DelegatingDataFlowInfo(this, newNullabilityInfo, newTypeInfo);
}