List of usage examples for com.google.common.collect Sets newLinkedHashSet
public static <E> LinkedHashSet<E> newLinkedHashSet()
From source file:org.gradle.api.reporting.dependents.internal.DependentComponentsUtils.java
public static Set<ComponentSpec> getAllTestSuites(ModelRegistry registry) { Set<ComponentSpec> components = Sets.newLinkedHashSet(); ModelMap<ComponentSpec> testSuites = modelElement(registry, "testSuites", modelMap(ComponentSpec.class)); if (testSuites != null) { components.addAll(testSuites.values()); }/*from w ww . j a va 2 s .c o m*/ return components; }
From source file:org.gradle.api.internal.artifacts.result.DefaultArtifactResolutionResult.java
public Set<ComponentArtifactsResult> getResolvedComponents() { Set<ComponentArtifactsResult> resolvedComponentResults = Sets.newLinkedHashSet(); for (ComponentResult componentResult : componentResults) { if (componentResult instanceof ComponentArtifactsResult) { resolvedComponentResults.add((ComponentArtifactsResult) componentResult); }// ww w . java 2 s . c o m } return resolvedComponentResults; }
From source file:de.tu_berlin.dima.oligos.stat.Table.java
public Table(final String schema, final String table, final long cardinality) { this.schema = schema; this.table = table; this.cardinality = cardinality; this.columns = Sets.newLinkedHashSet(); }
From source file:org.terasology.polyworld.voronoi.Region.java
/** * @param centerPos the center of the region *///from w w w. j a v a2 s. c o m public Region(Vector2f centerPos) { this.center = centerPos; this.corners = Sets.newTreeSet(new AngleOrdering(centerPos)); this.borders = Sets.newLinkedHashSet(); this.neighbors = Sets.newLinkedHashSet(); }
From source file:org.eclipse.sirius.tools.api.interpreter.context.SiriusInterpreterContextFactory.java
/** * Creates the {@link InterpreterContext} allowing to validate the * InterpretedExpression of the given target, stored in the given feature. * /* w w w . j a va2 s . co m*/ * @param element * the element containing the InterpretedExpression (NodeMapping, * ModelOperation...) * @param feature * the feature corresponding to the InterpretedExpression to * evaluate ( NodeMapping.semanticCandidatesExpression...) * @return the {@link InterpreterContext} allowing to validate the * InterpretedExpression of the given target, stored in the given * feature */ public static IInterpreterContext createInterpreterContext(EObject element, EStructuralFeature feature) { Collection<String> targetDomainClasses = Sets.newLinkedHashSet(); Collection<EPackage> avalaiblePackages = Sets.newLinkedHashSet(); Collection<String> dependencies = Sets.newLinkedHashSet(); Map<String, VariableType> variables = Maps.newLinkedHashMap(); boolean requiresTargetType = true; // Step 1 : getting the InterpretedExpressionQuery from the given // element IInterpretedExpressionQuery query = DialectManager.INSTANCE.createInterpretedExpressionQuery(element, feature); // Step 2 : getting the DomainClass of the target Option<Collection<String>> targetDomainClassesOption = query.getTargetDomainClasses(); // If the considered expression does not need any Target class to be // validated if (!targetDomainClassesOption.some()) { requiresTargetType = false; } else { for (String domainClass : targetDomainClassesOption.get()) { targetDomainClasses.add(domainClass); } } if (!targetDomainClassesOption.some() || !targetDomainClassesOption.get().isEmpty()) { // Step 2 : getting the packages to import to evaluate the // expression avalaiblePackages = query.getPackagesToImport(); // Step 3 : getting the defined variables variables = query.getAvailableVariables(); // Step 4 : getting the defined variables dependencies = query.getDependencies(); } // Step 5 : building the IInterpretedContext IInterpreterContext context = DefaultInterpreterContextFactory.createInterpreterContext(element, requiresTargetType, feature, VariableType.fromStrings(targetDomainClasses), avalaiblePackages, variables, dependencies); return context; }
From source file:com.google.eclipse.mechanic.internal.RegisteredTaskProvidersSupplier.java
public List<IResourceTaskProvider> get() { // This removes duplicates, but ensures insertion order. Set<ResourceTaskProvider> providers = Sets.newLinkedHashSet(); for (ResourceTaskProvider provider : OldMechanicPreferences.getTaskProviders()) { providers.add(provider);/*from ww w . j a v a 2 s.co m*/ } // To ensure clients don't mutate the list. List<IResourceTaskProvider> list = Lists.newArrayList(); list.addAll(providers); return Collections.unmodifiableList(list); }
From source file:org.sonar.batch.issue.ignore.pattern.LineRange.java
public Set<Integer> toLines() { Set<Integer> lines = Sets.newLinkedHashSet(); for (int index = from; index <= to; index++) { lines.add(index);// www .j a va 2 s . c o m } return lines; }
From source file:org.obiba.mica.web.model.SetDtos.java
Mica.SetOperationDto asDto(SetOperation setOperation) { Set<String> operands = Sets.newLinkedHashSet(); setOperation.getCompositions().forEach(set -> operands.addAll(set.getOperands())); Mica.SetOperationDto.Builder builder = Mica.SetOperationDto.newBuilder().setId(setOperation.getId()) .setType(setOperation.getType()).addAllSets(operands); setOperation.getCompositions().forEach(set -> builder.addCompositions(asDto(setOperation, set))); return builder.build(); }
From source file:net.opentsdb.contrib.tsquare.web.DataQueryModel.java
public DataQueryModel(final DataQueryResponseWriter responseWriter) { this.queries = Sets.newLinkedHashSet(); this.responseWriter = responseWriter; }
From source file:org.jclouds.ecs.compute.suppliers.EcsImageSupplier.java
@Override public Set<? extends Image> get() { // TODO Auto-generated method stub return Sets.newLinkedHashSet(); }