List of usage examples for java.util Vector addAll
public boolean addAll(Collection<? extends E> c)
From source file:nl.imvertor.common.file.EapFile.java
/** * //from w w w . jav a 2s .c o m * @param pkg * @return */ private Vector<Package> getPackageHierarchy(Package pkg) { Vector<Package> v = new Vector<Package>(); v.add(pkg); for (Package subPkg : pkg.GetPackages()) { v.addAll(getPackageHierarchy(subPkg)); } return v; }
From source file:cc.wulian.smarthomev5.fragment.singin.handler.DecodeThread.java
public DecodeThread(IQRScanHandlerResult scanHandlerResult, Vector<BarcodeFormat> decodeFormats, String characterSet) {//ww w .ja va2s.c o m this.scanHandlerResult = scanHandlerResult; handlerInitLatch = new CountDownLatch(1); hints = new Hashtable<DecodeHintType, Object>(1); if (decodeFormats == null || decodeFormats.isEmpty()) { decodeFormats = new Vector<BarcodeFormat>(); decodeFormats.addAll(DecodeFormatManager.PRODUCT_FORMATS); decodeFormats.addAll(DecodeFormatManager.INDUSTRIAL_FORMATS); decodeFormats.addAll(DecodeFormatManager.QR_CODE_FORMATS); decodeFormats.addAll(DecodeFormatManager.ONE_D_FORMATS); decodeFormats.addAll(DecodeFormatManager.DATA_MATRIX_FORMATS); decodeFormats.addAll(DecodeFormatManager.AZTEC_FORMATS); decodeFormats.addAll(DecodeFormatManager.PDF417_FORMATS); } hints.put(DecodeHintType.POSSIBLE_FORMATS, decodeFormats); if (characterSet != null) { hints.put(DecodeHintType.CHARACTER_SET, characterSet); } }
From source file:nl.imvertor.common.file.EapFile.java
/** * Return a list of all packages that are children of any EAP root model. * /*from w ww . j a v a2s.com*/ * @return * @throws Exception */ public Vector<Package> getChildPackages() throws Exception { Vector<Package> v = new Vector<Package>(); Iterator<Package> it = repo.GetModels().iterator(); while (it.hasNext()) { v.addAll(getChildPackages(it.next())); } return v; }
From source file:com.emc.plants.service.impl.CatalogBean.java
/** * Get all inventory items.//from w w w.j a v a2 s .c om * * @return Vector of Inventorys. */ public Vector getItems() { Vector items = new Vector(); int count = Util.getCategoryStrings().length; for (int i = 0; i < count; i++) { items.addAll(getItemsByCategory(i)); } //The return type must be Vector because the PBW client ActiveX sample requires Vector return items; }
From source file:org.mmadsen.sim.transmissionlab.models.MultipleNeutralTraitModel.java
@SuppressWarnings("unchecked") protected void addDynamicParameters(List<SimParameterOptionsMap> listParamOptMap) { this.log.debug("Adding dynamic parameters"); // add everything that comesin the listParamOptMap for (SimParameterOptionsMap poMap : listParamOptMap) { for (String parameter : poMap.getParameterNames()) { this.log.debug("Processing dynamic parameter " + parameter); Vector<String> paramVector = new Vector<String>(); List<String> paramOptions = poMap.getOptionsForParam(parameter); this.log.debug(" Options: " + paramOptions.toString()); paramVector.addAll(paramOptions); // create a property descriptor and register it in the descriptor panel ListPropertyDescriptor pd = new ListPropertyDescriptor(parameter, paramVector); this.parameterList.add(parameter); this.descriptors.put(parameter, pd); }//from w w w . j a va 2s . c om } }
From source file:org.parosproxy.paros.core.spider.Collector.java
public Vector getFormsQuery(Html html) { Vector qryList = new Vector(); Form[] forms = html.getForms();/*from w w w . j a v a 2 s .c o m*/ for (int i = 0; i < forms.length; i++) { Form form = forms[i]; Vector oneForm = getFormQuery(form, html.getURI()); qryList.addAll(oneForm); } return qryList; }
From source file:org.opensc.pkcs11.spi.PKCS11KeyStoreSpi.java
@Override public Enumeration<String> engineAliases() { // Enumeration is efinitely a misconception, as you can see // by the code below... Set<String> keys = this.entries.keySet(); Vector<String> sv = new Vector<String>(keys.size()); sv.addAll(keys); return sv.elements(); }
From source file:org.openmrs.module.chartsearch.web.dwr.DWRChartSearchService.java
public List<Object> findBatchOfObs(Integer patientId, String phrase, boolean includeRetired, List<String> includeClassNames, List<String> excludeClassNames, List<String> includeDatatypeNames, List<String> excludeDatatypeNames, Integer start, Integer length, List<String> selectedCategories) { // List to return // Object type gives ability to return error strings Vector<Object> objectList = new Vector<Object>(); Locale defaultLocale = Context.getLocale(); // get the list of locales to search on List<Locale> searchLocales = Context.getAdministrationService().getAllowedLocales(); // getSearchLocales(); try {/*ww w . j av a 2 s .c o m*/ List<ChartListItem> items = searcher.getDocumentList(patientId, phrase, start, length, selectedCategories); objectList.addAll(items); if (objectList.size() < 1) { objectList.add(Context.getMessageSourceService().getMessage("general.noMatchesFoundInLocale", new Object[] { "<b>" + phrase + "</b>", OpenmrsUtil.join(searchLocales, ", ") }, Context.getLocale())); } else { } } catch (Exception e) { log.error("Error while finding observations + " + e.getMessage(), e); objectList .add(Context.getMessageSourceService().getMessage("Obs.search.error") + " - " + e.getMessage()); } if (objectList.size() == 0) objectList.add(Context.getMessageSourceService().getMessage("general.noMatchesFoundInLocale", new Object[] { "<b>" + phrase + "</b>", defaultLocale }, Context.getLocale())); return objectList; }
From source file:org.jtwig.util.render.RenderHttpServletRequest.java
@Override public Enumeration getParameterNames() { Vector<String> vector = new Vector<>(); vector.addAll(postParameters.keySet()); vector.addAll(getParameters.keySet()); return vector.elements(); }
From source file:com.projity.exchange.ServerFileImporter.java
protected void prepareResources(List srcResources, Predicate resourceFilter, boolean resourceDescriptorsOnly) throws Exception { ResourceMappingForm form = getResourceMapping(); if (form == null) return;// w w w . j ava 2 s.c o m //server resources Vector projityResources = new Vector(); EnterpriseResourceData unassigned = new EnterpriseResourceData(); unassigned.setUniqueId(EnterpriseResource.UNASSIGNED_ID); unassigned.setName(Messages.getString("Text.Unassigned")); //$NON-NLS-1$ form.setUnassignedResource(unassigned); projityResources.add(unassigned); try { Session session = SessionFactory.getInstance().getSession(false); projityResources.addAll((Collection) SessionFactory.call(session, resourceDescriptorsOnly ? "retrieveResourceDescriptors" : "retrieveResourceHierarchy", null, null)); if (projityResources != null && projityResources.size() > 0) form.setUnassignedResource(projityResources.get(0)); } catch (Exception e) { form.setLocal(true); return; } form.setResources(projityResources); //imported resources List resourcesToMap = new ArrayList(); Object resource; if (srcResources != null) for (Iterator i = srcResources.iterator(); i.hasNext();) { resource = i.next(); if (resourceFilter == null || resourceFilter.evaluate(resource)) resourcesToMap.add(resource); } form.setImportedResources(resourcesToMap); MergeField mergeField = new ResourceMappingForm.MergeField("name", "name", "name"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ form.addMergeField(mergeField); // if (!form.isJunit()) //claur // form.setMergeField(mergeField); mergeField = new ResourceMappingForm.MergeField("emailAddress", "emailAddress", "email"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ form.addMergeField(mergeField); mergeField = new ResourceMappingForm.MergeField("uniqueId", "externalId", "id"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ form.addMergeField(mergeField); }