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

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

Introduction

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

Prototype

public static <E> ImmutableSet<E> copyOf(Iterator<? extends E> elements) 

Source Link

Usage

From source file:co.cask.cdap.etl.api.lookup.KeyValueTableLookup.java

@Override
public Map<String, String> lookup(String... keys) {
    return lookup(ImmutableSet.copyOf(keys));
}

From source file:com.google.gxp.compiler.schema.ElementBuilder.java

ElementBuilder(String name, Set<ElementValidator.Flag> flags, String contentType, Set<DocType> docTypes) {
    this.name = name;
    this.flags = ImmutableSet.copyOf(flags);
    this.contentType = contentType;
    this.docTypes = ImmutableSet.copyOf(docTypes);
}

From source file:ca.cutterslade.match.scheduler.Match.java

/**
 * @param bestMatch/*www.ja  v a2 s  . c o  m*/
 * @param s
 */
public Match(Iterable<Team> teams, Slot slot) {
    if (null == teams)
        throw new IllegalArgumentException("teams may not be null");
    if (null == slot)
        throw new IllegalArgumentException("slot may not be null");
    this.teams = ImmutableSet.copyOf(teams);
    this.slot = slot;
}

From source file:com.eucalyptus.compute.vpc.VpcRouteStateInvalidationEvent.java

public VpcRouteStateInvalidationEvent(final Set<RouteKey> message) {
    super(ImmutableSet.copyOf(message));
}

From source file:org.sonar.sslr.internal.vm.lexerful.TokenTypesExpression.java

public TokenTypesExpression(TokenType... types) {
    this.types = ImmutableSet.copyOf(types);
}

From source file:com.facebook.presto.metadata.MetadataListing.java

public static SortedSet<String> listSchemas(Session session, Metadata metadata, AccessControl accessControl,
        String catalogName) {/*from   w w  w .ja  v  a2 s  .  co  m*/
    Set<String> schemaNames = ImmutableSet.copyOf(metadata.listSchemaNames(session, catalogName));
    return ImmutableSortedSet.copyOf(accessControl.filterSchemas(session.getRequiredTransactionId(),
            session.getIdentity(), catalogName, schemaNames));
}

From source file:org.sleuthkit.autopsy.timeline.events.TagsUpdatedEvent.java

/**
 * Get the set of event IDs for the events that have been tagged or
 * un-tagged./*from  www. j av  a  2s  .co  m*/
 *
 * @return The set of event IDs for the events that have been tagged or
 *         un-tagged.
 */
public ImmutableSet<Long> getUpdatedEventIDs() {
    return ImmutableSet.copyOf(updatedEventIDs);
}

From source file:com.google.auto.factory.processor.ImplemetationMethodDescriptor.java

private ImplemetationMethodDescriptor(Builder builder) {
    this.name = builder.name.get();
    this.returnType = builder.returnType.get();
    this.publicMethod = builder.publicMethod;
    this.passedParameters = ImmutableSet.copyOf(builder.passedParameters);
}

From source file:io.prestosql.connector.system.GlobalSystemConnectorFactory.java

@Inject
public GlobalSystemConnectorFactory(Set<SystemTable> tables, Set<Procedure> procedures) {
    this.tables = ImmutableSet.copyOf(requireNonNull(tables, "tables is null"));
    this.procedures = ImmutableSet.copyOf(requireNonNull(procedures, "procedures is null"));
}

From source file:org.eclipse.smarthome.core.events.AbstractEventFactory.java

/**
 * Must be called in subclass constructor to define the supported event types.
 * //from   ww w  .  ja  v  a 2 s  .  co m
 * @param supportedEventTypes the supported event types
 */
public AbstractEventFactory(Set<String> supportedEventTypes) {
    this.supportedEventTypes = ImmutableSet.copyOf(supportedEventTypes);
}