List of usage examples for com.google.common.collect ImmutableSet copyOf
public static <E> ImmutableSet<E> copyOf(Iterator<? extends E> elements)
From source file:brooklyn.rest.transform.EffectorTransformer.java
public static EffectorSummary effectorSummary(final EntityLocal entity, Effector<?> effector) { String applicationUri = "/v1/applications/" + entity.getApplicationId(); String entityUri = applicationUri + "/entities/" + entity.getId(); return new EffectorSummary(effector.getName(), effector.getReturnTypeName(), ImmutableSet.copyOf(Iterables.transform(effector.getParameters(), new Function<ParameterType<?>, EffectorSummary.ParameterSummary<?>>() { @Override public EffectorSummary.ParameterSummary<?> apply( @Nullable ParameterType<?> parameterType) { return parameterSummary(entity, parameterType); }//from w w w . jav a 2s.c o m })), effector.getDescription(), ImmutableMap.of("self", URI.create(entityUri + "/effectors/" + effector.getName()), "entity", URI.create(entityUri), "application", URI.create(applicationUri))); }
From source file:de.xaniox.heavyspleef.persistence.DatabaseContext.java
@SafeVarargs public DatabaseContext(T... accessors) { this.accessors = ImmutableSet.copyOf(accessors); }
From source file:com.textocat.textokit.commons.util.DefaultCorpusSplit.java
public DefaultCorpusSplit(Iterable<String> trainingSetPaths, Iterable<String> testingSetPaths) { this.trainingSetPaths = ImmutableSet.copyOf(trainingSetPaths); this.testingSetPaths = ImmutableSet.copyOf(testingSetPaths); }
From source file:com.b2international.index.query.SetPredicate.java
SetPredicate(String field, Iterable<T> values) { super(field); this.values = ImmutableSet.copyOf(values); }
From source file:io.ytcode.reflect.resource.Scanner.java
public static Scanner paths(String... paths) { return from(ImmutableSet.of(Thread.currentThread().getContextClassLoader()), ImmutableSet.copyOf(paths), true);/*from ww w .j a va 2 s . c o m*/ }
From source file:org.gradle.platform.base.internal.VariantAspect.java
public VariantAspect(Set<ModelProperty<?>> dimensions) { this.dimensions = ImmutableSet.copyOf(dimensions); }
From source file:com.forerunnergames.tools.common.MutatorResult.java
public static void commitAllSuccessful(final MutatorResult<?>... results) { Arguments.checkIsNotNull(results, "results"); Arguments.checkHasNoNullElements(results, "results"); commitAllSuccessful(ImmutableSet.copyOf(results)); }
From source file:org.chaston.oakfunds.security.UserAuthenticationScope.java
UserAuthenticationScope(SystemAuthenticationManagerImpl authenticationManager, Set<String> userPermissions) { super(authenticationManager); this.userPermissions = ImmutableSet.copyOf(userPermissions); }
From source file:com.spotify.dns.StaticChangeNotifier.java
/** * Create a static {@link ChangeNotifier}. * * @param records The records to provide. *///from w w w .j a v a 2s .co m StaticChangeNotifier(final Set<T> records) { this.records = ImmutableSet.copyOf(records); }
From source file:org.opendaylight.mdsal.dom.spi.AbstractDOMRpcProviderService.java
@Override public final <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation( final T implementation, final DOMRpcIdentifier... types) { return registerRpcImplementation(implementation, ImmutableSet.copyOf(types)); }