List of usage examples for java.util LinkedHashSet LinkedHashSet
public LinkedHashSet()
From source file:business.controllers.LabController.java
public void transferLabData(Lab body, Lab lab) { lab.setName(body.getName());/*from w ww.j a va 2s. c o m*/ lab.setHubAssistanceEnabled(body.isHubAssistanceEnabled()); if (lab.getContactData() == null) { lab.setContactData(new ContactData()); } lab.getContactData().copy(body.getContactData()); Set<String> emailAddresses = new LinkedHashSet<>(); for (String email : body.getEmailAddresses()) { try { InternetAddress address = new InternetAddress(email); address.validate(); emailAddresses.add(email.trim().toLowerCase()); } catch (AddressException e) { throw new EmailAddressInvalid(email); } } lab.setEmailAddresses(new ArrayList<>(emailAddresses)); }
From source file:ws.salient.model.Module.java
public Module withDependency(String dependency) { if (dependencies == null) { dependencies = new LinkedHashSet(); }//from www . java2 s. co m dependencies.add(dependency); return this; }
From source file:org.openmrs.module.emrapi.encounter.EmrOrderServiceImpl_1_12.java
@Override public void save(List<EncounterTransaction.DrugOrder> drugOrders, Encounter encounter) { Set<OrderGroup> orderGroups = new LinkedHashSet<OrderGroup>(); for (EncounterTransaction.DrugOrder drugOrder : drugOrders) { OrderGroup orderGroup = mapToOpenMRSOrderGroup(orderGroups, drugOrder.getOrderGroup(), encounter); DrugOrder omrsDrugOrder = openMRSDrugOrderMapper.map(drugOrder, encounter); omrsDrugOrder.setOrderGroup(orderGroup); encounter.addOrder(omrsDrugOrder); }//from w w w .ja va 2s.co m encounterService.saveEncounter(encounter); }
From source file:com.redhat.rhn.frontend.action.configuration.BaseRankChannels.java
/** * Sets up the rangling widget.// www . j ava 2s . com * @param context the request context of the current request * @param form the dynaform related to the current request. * @param set the rhnset holding the channel ids. */ protected void setupWidget(RequestContext context, DynaActionForm form, RhnSet set) { User user = context.getCurrentUser(); LinkedHashSet labelValues = new LinkedHashSet(); populateWidgetLabels(labelValues, context); for (Iterator itr = set.getElements().iterator(); itr.hasNext();) { Long ccid = ((RhnSetElement) itr.next()).getElement(); ConfigChannel channel = ConfigurationManager.getInstance().lookupConfigChannel(user, ccid); labelValues.add(lv(channel.getName(), channel.getId().toString())); } //set the form variables for the widget to read. form.set(POSSIBLE_CHANNELS, labelValues); if (!labelValues.isEmpty()) { if (form.get(SELECTED_CHANNEL) == null) { String selected = ((LabelValueBean) labelValues.iterator().next()).getValue(); form.set(SELECTED_CHANNEL, selected); } } }
From source file:com.espertech.esper.epl.join.table.PropertySortedEventTable.java
/** * Ctor./*from ww w . jav a2 s . com*/ * @param streamNum - the stream number that is indexed */ public PropertySortedEventTable(int streamNum, EventPropertyGetter propertyGetter) { this.streamNum = streamNum; this.propertyGetter = propertyGetter; propertyIndex = new TreeMap<Object, Set<EventBean>>(); nullKeyedValues = new LinkedHashSet<EventBean>(); }
From source file:com.couchbase.spring.cache.CouchbaseCacheManager.java
/** * Populates all caches.//from www. j av a 2 s.co m * * @return a collection of loaded caches. */ @Override protected final Collection<? extends Cache> loadCaches() { Collection<Cache> caches = new LinkedHashSet<Cache>(); for (Map.Entry<String, CouchbaseClient> cache : this.clients.entrySet()) { caches.add(new CouchbaseCache(cache.getKey(), cache.getValue())); } return caches; }
From source file:com.egt.ejb.toolkit.JasperQuery.java
public JasperQuery(ToolKitBeanLocator locator, Dominio dominio) { this.locator = locator; this.dominio = dominio; this.parametros = dominio.getClaseRecursoIdClaseRecurso().getClaseRecursoParIdClaseRecursoCollection(); this.name = dominio.getCodigoDominio(); this.queryString = ""; this.fields = new LinkedHashSet(); this.initBaseTable(); this.initBaseTableColumns(); }
From source file:com.github.reinert.jjschema.JsonSchemaGenerator.java
Set<ManagedReference> getForwardReferences() { if (forwardReferences == null) forwardReferences = new LinkedHashSet<ManagedReference>(); return forwardReferences; }
From source file:io.fabric8.vertx.maven.plugin.mojos.InitializeMojo.java
@Override public void execute() throws MojoExecutionException, MojoFailureException { if (skip) {// w w w .ja v a 2 s . c o m getLog().info("vertx:initialize skipped by configuration"); return; } // Initialize the web root directory with Vert.x web default. // The directory is only created on demand. if (webRoot == null) { webRoot = new File(project.getBuild().getOutputDirectory(), "webroot"); } Set<Artifact> dependencies = new LinkedHashSet<>(); dependencies.addAll(this.project.getDependencyArtifacts()); dependencies.addAll(this.project.getArtifacts()); copyJSDependencies(dependencies); unpackWebjars(dependencies); // Start the spy MavenExecutionRequest request = session.getRequest(); MojoSpy.init(request); }
From source file:org.eclipse.virgo.ide.manifest.internal.core.model.BundleManifest.java
public BundleManifest(IFile file) { super(null, file.getName()); this.file = file; this.problems = new LinkedHashSet<ValidationProblem>(); init();/* w w w . j a v a 2s. com*/ }