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

@SuppressWarnings({ "unchecked" })
    public static <E> ImmutableSet<E> of() 

Source Link

Usage

From source file:org.mule.module.extension.internal.introspection.AbstractCapableDescribed.java

AbstractCapableDescribed(String name, String description, Set<Object> capabilities) {
    super(name, description);
    this.capabilities = capabilities != null ? ImmutableSet.copyOf(capabilities) : ImmutableSet.of();
}

From source file:org.mule.module.extension.internal.introspection.AbstractImmutableCapableDescribed.java

AbstractImmutableCapableDescribed(String name, String description, Set<Object> capabilities) {
    super(name, description);
    this.capabilities = capabilities != null ? ImmutableSet.copyOf(capabilities) : ImmutableSet.of();
}

From source file:com.google.devtools.build.skyframe.NullDirtyKeyTrackerImpl.java

@Override
public Set<SkyKey> getDirtyKeys() {
    return ImmutableSet.of();
}

From source file:tile80.behaviors80.Beam.java

@Override
public Iterable<Tile80> crunch(Tile80 self, World80 world, Set<String> event) {
    return ImmutableSet.of();
}

From source file:org.jboss.aerogear.unifiedpush.test.ServiceSetProducer.java

@Produces
public Set<Service> dummyServices() {
    return ImmutableSet.of();
}

From source file:io.crate.auth.user.User.java

public static User of(String name, @Nullable Set<Privilege> privileges, SecureHash password) {
    return new User(name, ImmutableSet.of(), privileges == null ? ImmutableSet.of() : privileges, password);
}

From source file:com.facebook.buck.go.GoAssumptions.java

public static void assumeGoCompilerAvailable() throws InterruptedException, IOException {
    Throwable exception = null;/*  www  .  ja  v a 2  s .  c  om*/
    try {
        ProcessExecutor executor = new DefaultProcessExecutor(new TestConsole());

        FakeBuckConfig.Builder baseConfig = FakeBuckConfig.builder();
        String goRoot = System.getenv("GOROOT");
        if (goRoot != null) {
            baseConfig.setSections("[go]", "  root = " + goRoot);
            // This should really act like some kind of readonly bind-mount onto the real filesystem.
            // But this is currently enough to check whether Go seems to be installed, so we'll live...
            FakeProjectFilesystem fs = new FakeProjectFilesystem();
            fs.mkdirs(fs.getPath(goRoot));
            baseConfig.setFilesystem(fs);
        }
        new GoBuckConfig(baseConfig.build(), executor, FlavorDomain.from("Cxx", ImmutableSet.of()))
                .getCompiler();
    } catch (HumanReadableException e) {
        exception = e;
    }
    assumeNoException(exception);
}

From source file:com.facebook.buck.testutil.TargetGraphFactory.java

public static TargetGraph newInstance(Iterable<TargetNode<?, ?>> nodes) {
    Map<BuildTarget, TargetNode<?, ?>> builder = new HashMap<>();
    for (TargetNode<?, ?> node : nodes) {
        builder.put(node.getBuildTarget(), node);
        BuildTarget unflavoredTarget = BuildTarget.of(node.getBuildTarget().getUnflavoredBuildTarget());
        if (node.getBuildTarget().isFlavored() && !builder.containsKey(unflavoredTarget)) {
            builder.put(unflavoredTarget, node);
        }/*from  www  . j  a  v a 2s .  c  om*/
    }
    ImmutableMap<BuildTarget, TargetNode<?, ?>> map = ImmutableMap.copyOf(builder);

    MutableDirectedGraph<TargetNode<?, ?>> graph = new MutableDirectedGraph<>();
    for (TargetNode<?, ?> node : map.values()) {
        graph.addNode(node);
        for (BuildTarget dep : node.getDeps()) {
            graph.addEdge(node, Preconditions.checkNotNull(map.get(dep), dep));
        }
    }
    return new TargetGraph(graph, map, ImmutableSet.of());
}

From source file:org.immutables.fixture.jdkonly.EmptyEnumMapAndSet.java

@Value.Default
public Set<Generations> gens() {
    return ImmutableSet.of();
}

From source file:vazkii.botania.api.internal.DummyManaNetwork.java

@Override
public Set<TileSignature> getAllCollectorsInWorld(World world) {
    return ImmutableSet.of();
}