Example usage for com.google.common.collect Sets newLinkedHashSet

List of usage examples for com.google.common.collect Sets newLinkedHashSet

Introduction

In this page you can find the example usage for com.google.common.collect Sets newLinkedHashSet.

Prototype

public static <E> LinkedHashSet<E> newLinkedHashSet() 

Source Link

Document

Creates a mutable, empty LinkedHashSet instance.

Usage

From source file:com.google.gxp.compiler.alerts.AlertSetBuilder.java

/**
 * Clears this AlertSetBuilder. If {@link #buildAndClear()} is called
 * immediately afterwards, an empty AlertSet will be created.
 */// w w  w  .j a v  a  2 s.c  o m
public void clear() {
    alerts = Sets.newLinkedHashSet();
}

From source file:brooklyn.enricher.basic.SensorPropagatingEnricher.java

public static SensorPropagatingEnricher newInstanceListeningToAllSensorsBut(Entity source,
        Sensor<?>... excludes) {/*from  w  w  w. ja  v a2  s .  c  o  m*/
    Set<Sensor<?>> excluded = ImmutableSet.copyOf(excludes);
    Set<Sensor<?>> includes = Sets.newLinkedHashSet();

    for (Sensor<?> it : source.getEntityType().getSensors()) {
        if (!excluded.contains(it))
            includes.add(it);
    }
    return new SensorPropagatingEnricher(source, includes);
}

From source file:com.google.gerrit.server.project.ProjectHierarchyIterator.java

ProjectHierarchyIterator(ProjectCache c, AllProjectsName all, ProjectState firstResult) {
    cache = c;
    allProjectsName = all;

    seen = Sets.newLinkedHashSet();
    seen.add(firstResult.getProject().getNameKey());
    next = firstResult;
}

From source file:cc.recommenders.evaluation.distribution.calc.AbstractTaskProvider.java

@Override
public Collection<Callable<TTask>> createWorkers() {
    Set<Callable<TTask>> workers = Sets.newLinkedHashSet();
    for (TTask task : createTasks()) {
        workers.add(createWorker(task));
    }/*from   w  w w  .j  a va2 s .  c o  m*/
    return workers;
}

From source file:de.tu_berlin.dima.oligos.profiler.SchemaProfiler.java

public SchemaProfiler(final String schema, final SchemaConnector connector) {
    this.schema = schema;
    this.connector = connector;
    this.tableProfilers = Sets.newLinkedHashSet();
}

From source file:com.cinchapi.concourse.plugin.data.TrackingLinkedHashMultimap.java

@Override
protected Set<V> createValueSet() {
    return Sets.newLinkedHashSet();
}

From source file:uk.ac.ebi.atlas.experimentimport.experimentdesign.magetab.ProteomicsBaselineExperimentMageTabParser.java

@Override
protected Set<NamedSdrfNode<AssayNode>> getAssayNodes(SDRF sdrf) {

    Set<NamedSdrfNode<AssayNode>> namedSdrfNodes = Sets.newLinkedHashSet();
    for (AssayNode node : sdrf.getNodes(AssayNode.class)) {
        namedSdrfNodes.add(new NamedSdrfNode<>(node.getNodeName(), node));
    }// www  .j  a  v a 2s  . co  m
    return namedSdrfNodes;
}

From source file:org.gradle.language.base.internal.LanguageSourceSetContainer.java

public DomainObjectSet<LanguageSourceSet> getSources() {
    Set<LanguageSourceSet> all = Sets.newLinkedHashSet();
    all.addAll(mainSources);//from w  ww .j av  a2 s . co  m
    all.addAll(additionalSources);
    return new DefaultDomainObjectSet<LanguageSourceSet>(LanguageSourceSet.class, all);
}

From source file:org.eclipse.sirius.common.tools.api.interpreter.IInterpreterContextUtils.java

static Set<String> collectProjectsOrPlugins(IInterpreterContext context) {
    /*/*from www.  j a  v a 2s .c  o m*/
     * use the VSM resource to declare dependent project/bundles.
     */
    EObject vsmElement = context.getElement();
    Set<String> projectsOrBundleInScope = Sets.newLinkedHashSet();
    if (vsmElement != null && vsmElement.eResource() != null) {
        collectProjectName(vsmElement.eResource(), projectsOrBundleInScope);
        if (vsmElement.eResource().getResourceSet() != null) {
            for (Resource other : vsmElement.eResource().getResourceSet().getResources()) {
                if (other != vsmElement.eResource()) {
                    collectProjectName(other, projectsOrBundleInScope);
                }
            }
        }
    }
    return projectsOrBundleInScope;
}

From source file:org.jclouds.aws.sqs.xml.internal.BaseRegexQueueHandler.java

public Set<Queue> parse(String in) {
    Set<Queue> queues = Sets.newLinkedHashSet();
    Matcher matcher = pattern.matcher(in);
    while (matcher.find()) {
        String uriText = matcher.group(1);
        String queueName = uriText.substring(uriText.lastIndexOf('/') + 1);
        URI location = URI.create(uriText);
        String regionString = uriText.substring(0, uriText.indexOf(".com/") + 4);
        URI regionURI = URI.create(regionString);
        String region = uriToRegion.get(regionURI);
        queues.add(new Queue(region, queueName, location));
    }//  w w w .  j  a  v  a2  s.  c om
    return queues;
}