Example usage for java.util LinkedHashSet LinkedHashSet

List of usage examples for java.util LinkedHashSet LinkedHashSet

Introduction

In this page you can find the example usage for java.util LinkedHashSet LinkedHashSet.

Prototype

public LinkedHashSet() 

Source Link

Document

Constructs a new, empty linked hash set with the default initial capacity (16) and load factor (0.75).

Usage

From source file:ws.salient.model.Profile.java

public Profile withRepositories(Repository repository) {
    if (repositories == null) {
        repositories = new LinkedHashSet();
    }/*from   w w w. ja v a  2  s .co m*/
    repositories.add(repository);
    return this;
}

From source file:com.egt.core.aplicacion.FiltroBusqueda.java

private void init() {
    criterios = new LinkedHashSet<>();
    filtros = new LinkedHashSet<>();
    conjuncion = EnumConjuncion.Y;
}

From source file:no.dusken.aranea.admin.control.EditSectionController.java

@Override
protected Map referenceData(HttpServletRequest request, Object object, Errors errors) {

    Map<String, Object> map = new HashMap<String, Object>();
    Set<Section> sections = new LinkedHashSet<Section>();
    sections.add(null);/*w  ww  . ja  v a  2  s  . c om*/
    SectionService sectionService = (SectionService) getGenericService();
    sections.addAll(sectionService.getSections(false));
    map.put("topLevelSections", sections);

    return map;
}

From source file:com.samsung.sjs.theorysolver.TheorySolver.java

public static <Constraint, Model> void enumerateFixingSets(FixingSetFinder<Constraint> fixingSetFinder,
        Theory<Constraint, Model> theorySolver, Collection<Constraint> hardConstraints,
        Collection<Constraint> softConstraints, FixingSetListener<Constraint, Model> listener) {

    Collection<Constraint> constraints = new ArrayList<>();
    Collection<Constraint> core = new ArrayList<>();
    Collection<Constraint> fixingSet = new LinkedHashSet<>();
    for (;;) {//from w w w .j a  v a2 s .co  m

        if (fixingSetFinder.currentFixingSet(fixingSet, listener) == FixingSetListener.Action.STOP) {
            return;
        }

        constraints.addAll(hardConstraints);
        softConstraints.stream().filter(c -> !fixingSet.contains(c)).forEach(constraints::add);
        Either<Model, Collection<Constraint>> result = theorySolver.check(constraints);
        if (result.left != null) {
            if (listener.onFixingSet(result.left, fixingSet) == FixingSetListener.Action.STOP) {
                return;
            }
            fixingSetFinder.addCore(
                    constraints.stream().filter(softConstraints::contains).collect(Collectors.toList()));
        } else {
            result.right.stream().filter(softConstraints::contains).forEach(core::add);
            if (listener.onCore(core) == FixingSetListener.Action.STOP) {
                return;
            }
            assert core.stream().allMatch(c -> !fixingSet.contains(c));
            fixingSetFinder.addCore(core);
        }
        core.clear();
        constraints.clear();
        fixingSet.clear();

    }

}

From source file:ch.cyberduck.core.ProtocolFactory.java

public ProtocolFactory() {
    this(new LinkedHashSet<Protocol>());
}

From source file:com.mirth.connect.model.ChannelMetadata.java

public Set<String> getTags() {
    if (tags == null) {
        tags = new LinkedHashSet<String>();
    }
    return tags;
}

From source file:com.boundary.sdk.snmp.metric.HostLists.java

public List<Host> getHosts(List<Long> ids) {
    Set<Host> hosts = new LinkedHashSet<Host>();

    for (HostListEntry entry : hostLists) {
        if (ids.contains(entry.getId())) {
            for (Host host : entry.getHosts()) {
                if (host.isEnabled()) {
                    if (host.getPort() == Host.UKNOWN_PORT) {
                        host.setPort(entry.getPort());
                    }/* ww w .  ja  v  a 2 s.c  om*/
                    if (host.getCommunityRead() == null) {
                        host.setCommunityRead(entry.getCommunityRead());
                    }
                    hosts.add(host);
                }
            }
        }
    }

    List<Host> list = new ArrayList<Host>();
    list.addAll(hosts);
    return list;
}

From source file:co.turnus.analysis.util.AnalysisUtil.java

public static int[] linspacei(int min, int max, int points) {
    Set<Integer> values = new LinkedHashSet<Integer>();
    values.add(min);/*from  w w w . j a  va 2  s. c o m*/
    for (double d : linspaced(min, max, points)) {
        values.add((int) Math.floor(d));
    }
    values.add(max);
    return ArrayUtils.toPrimitive(values.toArray(new Integer[0]));
}

From source file:com.beaconhill.yqd.ProcessorCommand.java

public ProcessorCommand(String d, String s, boolean o) {
    symbols = new LinkedHashSet<String>();
    dataDir = new DataDir(d);
    symbolFile = s;/* w  w w.  jav  a 2 s .c  om*/
    outStdio = o;
}

From source file:com.snowstore.mercury.core.metric.SystemPublicMetrics.java

@Override
public Collection<Metric<?>> metrics() {
    Collection<Metric<?>> result = new LinkedHashSet<Metric<?>>();
    addBasicMetrics(result);/*from   w w w  .jav a 2  s .  c o m*/
    addManagementMetrics(result);
    return result;
}