List of usage examples for com.google.common.collect ImmutableSet copyOf
public static <E> ImmutableSet<E> copyOf(Iterator<? extends E> elements)
From source file:org.eclipse.che.api.workspace.server.spi.RuntimeInfrastructure.java
public RuntimeInfrastructure(String name, Set<String> types) throws ValidationException { if (name == null) throw new ValidationException("Infrastructure name undefined"); this.name = name; this.recipeTypes = ImmutableSet.copyOf(types); }
From source file:com.google.devtools.javatools.transform.scrubber.StripAnnotatedDeclarations.java
public StripAnnotatedDeclarations(Collection<String> stripAnnotations, Collection<String> includeAnnotations) { this.stripAnnotations = ImmutableSet.copyOf(stripAnnotations); this.includeAnnotations = ImmutableSet.copyOf(includeAnnotations); }
From source file:org.onosproject.evpnrouteservice.EvpnRouteSet.java
/** * Creates a new route set.//from w w w . ja v a 2 s . com * * @param tableId route table ID * @param prefix IP prefix * @param routes routes for the given prefix */ public EvpnRouteSet(EvpnRouteTableId tableId, EvpnPrefix prefix, Set<EvpnRoute> routes) { this.tableId = checkNotNull(tableId); this.prefix = checkNotNull(prefix); this.routes = ImmutableSet.copyOf(checkNotNull(routes)); }
From source file:org.gradle.api.internal.changedetection.state.IgnoringResourceHasher.java
public IgnoringResourceHasher(Set<String> ignores, ResourceHasher delegate) { this.delegate = delegate; this.ignores = ImmutableSet.copyOf(ignores); ImmutableSet.Builder<PathMatcher> builder = ImmutableSet.builder(); for (String ignore : ignores) { PathMatcher matcher = PatternMatcherFactory.compile(true, ignore); builder.add(matcher);/*from w w w . j a va2s. c o m*/ } this.ignoreMatchers = builder.build(); }
From source file:org.fenixedu.academic.domain.degreeStructure.CycleTypes.java
public CycleTypes(Collection<CycleType> types) { this.types = ImmutableSet.copyOf(types); }
From source file:org.datalorax.populace.core.walk.inspector.FieldInspector.java
@Override public Iterable<RawField> getFields(final Class<?> type, final Inspectors inspectors) { final List<RawField> collected = new ArrayList<>(); collectFields(type, inspectors, collected); collectSuperFields(type, inspectors, collected); return ImmutableSet.copyOf(collected); }
From source file:org.sosy_lab.cpachecker.cpa.smg.SMGStateInformation.java
private SMGStateInformation(Set<SMGEdgeHasValue> pHvEdges, Map<Integer, SMGEdgePointsTo> pPtEdges) { hvEdges = ImmutableSet.copyOf(pHvEdges); ptEdges = ImmutableMap.copyOf(pPtEdges); }
From source file:co.cask.cdap.data2.metadata.lineage.CollapsedRelation.java
public CollapsedRelation(Id.DatasetInstance dataset, Id.Program program, Set<AccessType> access, Set<RunId> runs, Set<Id.NamespacedId> components) { this.data = dataset; this.program = program; this.access = ImmutableSet.copyOf(access); this.runs = ImmutableSet.copyOf(runs); this.components = ImmutableSet.copyOf(components); }
From source file:com.onboard.service.account.function.InvitationProjectFilter.java
public InvitationProjectFilter(Collection<InvitationProjects> existings) { this.existingProjectIds = ImmutableSet .copyOf(Iterables.transform(existings, new Function<InvitationProjects, Integer>() { @Override/*from w w w. j a v a 2 s . co m*/ public Integer apply(InvitationProjects input) { return input.getProjectId(); } })); }
From source file:com.brighttag.agathon.dao.zerg.ZergHosts.java
/** * Creates a ZergHosts set from a collection of {@link ZergHost}s. * * @param hosts the hosts to be in this set * @return the ZergHosts//from www . j a v a 2s . c o m */ public static ZergHosts from(Collection<ZergHost> hosts) { return new ZergHosts(ImmutableSet.copyOf(hosts)); }