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.proto.ServiceMeta.java

public ServiceMeta(String id, String name, String description, Set<String> runnables) {
    this.id = id;
    this.name = name;
    this.description = description;
    this.runnables = ImmutableSet.copyOf(runnables);
}

From source file:org.onosproject.segmentrouting.MockInterfaceService.java

MockInterfaceService(Set<Interface> interfaces) {
    this.interfaces = ImmutableSet.copyOf(interfaces);
}

From source file:com.opengamma.livedata.normalization.UnitChange.java

public UnitChange(double multiplier, String... fields) {
    ArgumentChecker.notNull(fields, "fields");
    _fields = ImmutableSet.copyOf(fields);
    _multiplier = multiplier;
}

From source file:org.elasticsearch.plugin.readonlyrest.ldap.LdapUser.java

public LdapUser(String uid, String dn, Set<LdapGroup> groups) {
    this.uid = uid;
    this.dn = dn;
    this.groups = ImmutableSet.copyOf(groups);
}

From source file:org.jclouds.chef.util.CollectionUtils.java

/**
 * Creates an immutable set with the elements of the given set. If the input
 * set is <code>null</code>, it returns an empty set.
 * //  w w w  . java 2  s. c  o m
 * @param input
 *           The set used to build the immutable one.
 * @return An immutable set with the elements of the given set.
 */
public static <T> ImmutableSet<T> copyOfOrEmpty(@Nullable Set<T> input) {
    return input == null ? ImmutableSet.<T>of() : ImmutableSet.copyOf(input);
}

From source file:org.eclipse.buildship.core.workspace.internal.ValidateProjectLocationOperation.java

public ValidateProjectLocationOperation(Set<OmniEclipseProject> projects) {
    this.projects = ImmutableSet.copyOf(projects);
}

From source file:org.gradle.api.internal.file.collections.ImmutableFileCollection.java

public static ImmutableFileCollection of(Iterable<File> files) {
    if (Iterables.isEmpty(files)) {
        return EMPTY;
    }/*from  w w w.ja va 2  s  . c o m*/
    return new FileOnlyImmutableFileCollection(ImmutableSet.copyOf(files));
}

From source file:org.nlplab.brat.configuration.BratAttributeType.java

public BratAttributeType(String name, Set<String> values) {
    super(name);//from w w w . j  a  va  2 s.  co m
    if (values == null) {
        values = Sets.newHashSet();
    }
    this.values = ImmutableSet.copyOf(values);
}

From source file:com.opengamma.engine.marketdata.live.MarketDataAvailabilityNotification.java

/**
 * @param schemes Schemes handled by the provider.
 */// w ww  . j  a v a  2 s . co m
public MarketDataAvailabilityNotification(Set<ExternalScheme> schemes) {
    ArgumentChecker.notEmpty(schemes, "schemes");
    _schemes = ImmutableSet.copyOf(schemes);
}

From source file:org.springframework.ide.eclipse.editor.support.util.EnumValueParser.java

public EnumValueParser(String typeName, Collection<String> values) {
    this.typeName = typeName;
    this.values = ImmutableSet.copyOf(values);
}