当前位置: 首页>>代码示例>>Java>>正文


Java Vector.addAll方法代码示例

本文整理汇总了Java中java.util.Vector.addAll方法的典型用法代码示例。如果您正苦于以下问题:Java Vector.addAll方法的具体用法?Java Vector.addAll怎么用?Java Vector.addAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.Vector的用法示例。


在下文中一共展示了Vector.addAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DecodeThread

import java.util.Vector; //导入方法依赖的package包/类
DecodeThread(CaptureActivity activity,
             Vector<BarcodeFormat> decodeFormats,
             String characterSet,
             ResultPointCallback resultPointCallback) {

  this.activity = activity;
  handlerInitLatch = new CountDownLatch(1);

  hints = new Hashtable<DecodeHintType, Object>(3);

  if (decodeFormats == null || decodeFormats.isEmpty()) {
  	 decodeFormats = new Vector<BarcodeFormat>();
  	 decodeFormats.addAll(DecodeFormatManager.ONE_D_FORMATS);
  	 decodeFormats.addAll(DecodeFormatManager.QR_CODE_FORMATS);
  	 decodeFormats.addAll(DecodeFormatManager.DATA_MATRIX_FORMATS);
  }
  
  hints.put(DecodeHintType.POSSIBLE_FORMATS, decodeFormats);

  if (characterSet != null) {
    hints.put(DecodeHintType.CHARACTER_SET, characterSet);
  }

  hints.put(DecodeHintType.NEED_RESULT_POINT_CALLBACK, resultPointCallback);
}
 
开发者ID:CoderCF,项目名称:ZXingDemo,代码行数:26,代码来源:DecodeThread.java

示例2: getFeatureNamesStatic

import java.util.Vector; //导入方法依赖的package包/类
public static String[] getFeatureNamesStatic() {
	if (ftrNames == null) {
		Vector<String> v = new Vector<String>();
		v.addAll(Arrays.asList(AnnotationFeaturePack.getFeatureNamesStatic()));
		v.add("covered_tokens_incr");
		v.add("covered_tokens_incr_ratio");
		v.add("covered_tokens_after");
		v.add("segments_lp_sum");
		v.add("segments_lp_avg");
		v.add("segments_lp_ratio");
		v.add("max_relatedness_before");
		v.add("avg_relatedness_before");
		v.add("max_relatedness_mw_before");
		v.add("min_relatedness_mw");
		v.add("max_relatedness_mw");
		v.add("min_relatedness_diff");
		v.add("avg_relatedness_diff");
		v.add("min_relatedness_mw_diff");
		v.add("max_relatedness_mw_diff");
		ftrNames = v.toArray(new String[] {});
	}
	return ftrNames;
}
 
开发者ID:marcocor,项目名称:smaph,代码行数:24,代码来源:GreedyFeaturePack.java

示例3: getProbabilityComponents

import java.util.Vector; //导入方法依赖的package包/类
/**
 * Helper method to extract the probability components the dialog's components.
 * These components are the probability labels and the probability TextFields.
 * @return a Vector of probability related components
 * @author Federico Dal Castello
 */
private Vector<Component> getProbabilityComponents() {
	Vector<Component> probabilityComponents = new Vector<Component>();

	Vector<Component> components = new Vector<Component>();
	components.addAll(Arrays.asList(intervalPanels[1].getComponents()));
	components.addAll(Arrays.asList(intervalPanels[2].getComponents()));

	Iterator<Component> it = components.iterator();

	while (it.hasNext()) {
		Component comp = it.next();

		if (comp instanceof JTextField) {
			if (comp.getName().equals(PROBABILITY_INTERVAL_A) || comp.getName().equals(PROBABILITY_INTERVAL_B)) {
				probabilityComponents.add(comp);
			}
		}

		if (comp instanceof JLabel && ((JLabel) comp).getText().equals(PROBABILITY)) {
			probabilityComponents.add(comp);
		}
	}

	return probabilityComponents;
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:32,代码来源:DistributionsEditor.java

示例4: updateTable

import java.util.Vector; //导入方法依赖的package包/类
private void updateTable(Iterator iterator) {
	int rowCount = dftm.getRowCount();
	for (int i = 0; i < rowCount; i++) {
		dftm.removeRow(0);
	}
	while (iterator.hasNext()) {
		Vector vector = new Vector();
		List view = (List) iterator.next();
		Vector row=new Vector(view);
		int rowSize = row.size();
		for(int i=rowSize-2;i<rowSize;i++){
			Object colValue = row.get(i);
			row.remove(i);
			row.insertElementAt(colValue, 2);
		}
		vector.addAll(row);
		dftm.addRow(vector);
	}
}
 
开发者ID:Edward7Zhang,项目名称:SuperMarketManageSystem,代码行数:20,代码来源:XiaoShouPaiHang.java

示例5: DecodeThread

import java.util.Vector; //导入方法依赖的package包/类
DecodeThread(CaptureFragment fragment,
             Vector<BarcodeFormat> decodeFormats,
             String characterSet,
             ResultPointCallback resultPointCallback) {

    this.fragment = fragment;
    handlerInitLatch = new CountDownLatch(1);

    hints = new Hashtable<DecodeHintType, Object>(3);

    if (decodeFormats == null || decodeFormats.isEmpty()) {
        decodeFormats = new Vector<BarcodeFormat>();
        decodeFormats.addAll(DecodeFormatManager.ONE_D_FORMATS);
        decodeFormats.addAll(DecodeFormatManager.QR_CODE_FORMATS);
        decodeFormats.addAll(DecodeFormatManager.DATA_MATRIX_FORMATS);
    }

    hints.put(DecodeHintType.POSSIBLE_FORMATS, decodeFormats);

    if (characterSet != null) {
        hints.put(DecodeHintType.CHARACTER_SET, characterSet);
    }

    hints.put(DecodeHintType.NEED_RESULT_POINT_CALLBACK, resultPointCallback);
}
 
开发者ID:Jusenr,项目名称:zxing_qrcode_demo,代码行数:26,代码来源:DecodeThread.java

示例6: getAllValidTemplates

import java.util.Vector; //导入方法依赖的package包/类
public Vector getAllValidTemplates() {
    // Return templates if no imported/included stylesheets
    if (_includedStylesheets == null) {
        return _templates;
    }

    // Is returned value cached?
    if (_allValidTemplates == null) {
       Vector templates = new Vector();
       templates.addAll(_templates);
        int size = _includedStylesheets.size();
        for (int i = 0; i < size; i++) {
            Stylesheet included =(Stylesheet)_includedStylesheets.elementAt(i);
            templates.addAll(included.getAllValidTemplates());
        }
        //templates.addAll(_templates);

        // Cache results in top-level stylesheet only
        if (_parentStylesheet != null) {
            return templates;
        }
        _allValidTemplates = templates;
     }

    return _allValidTemplates;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:Stylesheet.java

示例7: getUnits

import java.util.Vector; //导入方法依赖的package包/类
public Vector<IUnit> getUnits(String server, NetworkModel model) {
	Vector<IUnit> rules = new Vector<IUnit>();
	rules.add(new ComplexUnit(getLabel() + "_compound", precondition, "",
			getLabel() + "_unchanged=1;\n" + getLabel() + "_compound=1;\n"));
	rules.addAll(this.getChildren(server, model));
	rules.add(new ComplexUnit(getLabel(), precondition, config + "\n" + getLabel() + "_unchanged=1;\n",
			getLabel() + "=$" + getLabel() + "_unchanged;\n"));
	return rules;
}
 
开发者ID:privacyint,项目名称:thornsec-core,代码行数:10,代码来源:ACompoundProfile.java

示例8: updateTable

import java.util.Vector; //导入方法依赖的package包/类
private void updateTable(Iterator iterator) {
	int rowCount = dftm.getRowCount();
	for (int i = 0; i < rowCount; i++) {
		dftm.removeRow(0);
	}
	while (iterator.hasNext()) {
		Vector vector = new Vector();
		List view = (List) iterator.next();
		vector.addAll(view);
		dftm.addRow(vector);
	}
}
 
开发者ID:Edward7Zhang,项目名称:SuperMarketManageSystem,代码行数:13,代码来源:RuKuTuiHuoChaXun.java

示例9: getEventsForDate

import java.util.Vector; //导入方法依赖的package包/类
public static Collection getEventsForDate(CalendarDate date) {
	Vector v = new Vector();
	Day d = getDay(date);
	if (d != null) {
		Elements els = d.getElement().getChildElements("event");
		for (int i = 0; i < els.size(); i++)
			v.add(new EventImpl(els.get(i)));
	}
	Collection r = getRepeatableEventsForDate(date);
	if (r.size() > 0)
		v.addAll(r);
	//EventsVectorSorter.sort(v);
	Collections.sort(v);
	return v;
}
 
开发者ID:ser316asu,项目名称:SER316-Munich,代码行数:16,代码来源:EventsManager.java

示例10: ConfigureParameters

import java.util.Vector; //导入方法依赖的package包/类
/**
 * Creates new form ConfigureParameters
 */
public ConfigureParameters() {
    initComponents();
    setModal(true);
    
    Vector<String> entries = new Vector<>();
    entries.add("int");
    entries.add("double");
    entries.add("boolean");
    entries.add("String");
    entries.add("long");
    entries.add("float");
    entries.addAll(Library.getInstance().getProject().getEntityNames());
    
    cbParamType.setModel(new DefaultComboBoxModel(entries));
}
 
开发者ID:fesch,项目名称:Moenagade,代码行数:19,代码来源:ConfigureParameters.java

示例11: getNetworkComponentVectorSorted

import java.util.Vector; //导入方法依赖的package包/类
/**
 * Returns all {@link NetworkComponent}s of the network model sorted by the numeric value of the ID of the component.
 * @param ascending set true to sort ascending, false to sort descending
 * @return a sorted NetworkComponent vector sorted
 */
public Vector<NetworkComponent> getNetworkComponentVectorSorted(boolean ascending) {
	
	Vector<NetworkComponent> netCompVector = new Vector<NetworkComponent>();
	netCompVector.addAll(this.getNetworkComponents().values());
	
	Comparator<NetworkComponent> comp = null;
	if (ascending==true) {
		// --- Ascending sorted ---------------------------------
		comp = new Comparator<NetworkComponent>() {
			@Override
			public int compare(NetworkComponent netComp1, NetworkComponent netComp2) {
				Integer n1 = Integer.parseInt(netComp1.getId().replaceAll("\\D+",""));
				Integer n2 = Integer.parseInt(netComp2.getId().replaceAll("\\D+",""));
				return n1.compareTo(n2);
			}
		};
		
	} else {
		// --- Desscending sorted -------------------------------
		comp = new Comparator<NetworkComponent>() {
			@Override
			public int compare(NetworkComponent netComp1, NetworkComponent netComp2) {
				Integer n1 = Integer.parseInt(netComp1.getId().replaceAll("\\D+",""));
				Integer n2 = Integer.parseInt(netComp2.getId().replaceAll("\\D+",""));
				return n1.compareTo(n2);
			}
		};
		
	}
	Collections.sort(netCompVector, comp);
	return netCompVector;
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:38,代码来源:NetworkModel.java

示例12: getUnits

import java.util.Vector; //导入方法依赖的package包/类
public Vector<IUnit> getUnits() {
	Vector<IUnit> units = new Vector<IUnit>();

	units.addElement(new FileUnit("sources_list", "proceed", getPersistent(), "/etc/apt/sources.list"));
	units.addElement(new InstalledUnit("dirmngr", "proceed", "dirmngr",
					 "Couldn't install dirmngr.  Anything which requires a GPG key to be downloaded and installed won't work. "
					 + "You can possibly fix this by reconfiguring the service."));
	
	units.addAll(gpg);
	units.addAll(sources);
	
	return units;
}
 
开发者ID:privacyint,项目名称:thornsec-core,代码行数:14,代码来源:AptSourcesModel.java

示例13: analyzeBitmap

import java.util.Vector; //导入方法依赖的package包/类
/**
 * 解析二维码图片工具类
 *
 * @param bitmap
 */
public static String analyzeBitmap(Bitmap bitmap) {
    MultiFormatReader multiFormatReader = new MultiFormatReader();

    // 解码的参数
    Hashtable<DecodeHintType, Object> hints = new Hashtable<DecodeHintType, Object>(2);
    // 可以解析的编码类型
    Vector<BarcodeFormat> decodeFormats = new Vector<BarcodeFormat>();
    if (decodeFormats == null || decodeFormats.isEmpty()) {
        decodeFormats = new Vector<BarcodeFormat>();

        // 这里设置可扫描的类型,我这里选择了都支持
        decodeFormats.addAll(DecodeFormatManager.ONE_D_FORMATS);
        decodeFormats.addAll(DecodeFormatManager.QR_CODE_FORMATS);
        decodeFormats.addAll(DecodeFormatManager.DATA_MATRIX_FORMATS);
    }
    hints.put(DecodeHintType.POSSIBLE_FORMATS, decodeFormats);
    // 设置继续的字符编码格式为UTF8
    hints.put(DecodeHintType.CHARACTER_SET, "UTF8");
    // 设置解析配置参数
    multiFormatReader.setHints(hints);

    // 开始对图像资源解码
    Result rawResult = null;
    try {
        rawResult = multiFormatReader.decodeWithState(new BinaryBitmap(new HybridBinarizer(new BitmapLuminanceSource(bitmap))));
    } catch (Exception e) {
        e.printStackTrace();
    }

    if (rawResult != null) {
        return rawResult.getText();
    } else {
        return "Failed";
    }
}
 
开发者ID:ymqq,项目名称:CommonFramework,代码行数:41,代码来源:ImageUtils.java

示例14: getChildNodeVector

import java.util.Vector; //导入方法依赖的package包/类
/**
 * Gets the child node vector.
 * @return the child node vector
 */
private Vector<Object> getChildNodeVector(DefaultMutableTreeNode parentNode, boolean visibleInTableView) {
	
	Vector<Object> childVector = new Vector<Object>();
	boolean childNodesVisible = true;
	for (int i=0; i<parentNode.getChildCount(); i++) {

		// --------------------------------------------
		// --- Create data row for this node ----------
		DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) parentNode.getChildAt(i);
		DynType dynType = (DynType) childNode.getUserObject();
		dynType.setVisibleInTableView(visibleInTableView);
		
		if (visibleInTableView==true) {
			// --- Are child slots visible in the table ---
			if (OntologyVisualisationConfiguration.isRegisteredOntologyClassVisualisation(dynType.getClassName())) {
				childNodesVisible = false;
			} else {
				childNodesVisible = true;
			}
			
		} else {
			// --- nodes and sub node are invisible ---
			childNodesVisible = visibleInTableView;
		}
		
		// --- Create data row ------------------------
		Vector<Object> dataRow = new Vector<Object>();			
		dataRow.add(dynType);
		dataRow.add(dynType);
		// --- Add to mainVector ----------------------
		childVector.add(dataRow);
		
		// --------------------------------------------
		// --- Remind the row number as editable!? ----
		if (dynType.getTypeName().equals(DynType.typeRawType)) {
			this.getEditableRowsVector().add(this.rowCounter);
		}
		this.rowCounter++;
		
		// --------------------------------------------
		// --- Add the Child nodes, if available ------
		if (childNode.getChildCount()!=0) {
			// --- get child nodes first --------------
			childVector.addAll(this.getChildNodeVector(childNode, childNodesVisible));
		}
		
	}
	return childVector;
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:54,代码来源:DynTableDataVector.java

示例15: transform

import java.util.Vector; //导入方法依赖的package包/类
@SuppressWarnings("unused") 
   public SingleConstraintSet transform(SingleConstraintSet constraintSet) {
// check if any Assignments are already contained or if any Assignments
// can be read of trivially and insert the assignments into the
// remaining constraints
Vector<Assignment> assignments = new Vector<Assignment>();
Vector<SingleConstraint> checkedConstraints = new Vector<SingleConstraint>();
Vector<SingleConstraint> uncheckedConstraints = new Vector<SingleConstraint>();
for (int i = 0; i < constraintSet.getConstraintCount(); i++)
    uncheckedConstraints.add(constraintSet.getConstraint(i));
while (!uncheckedConstraints.isEmpty()){
    SingleConstraint constraint = uncheckedConstraints.remove(0);
    if (constraint instanceof Assignment){
	assignments.add((Assignment)constraint);
	uncheckedConstraints.addAll(checkedConstraints);
	checkedConstraints.removeAllElements();
    } else{
	for (int assignmentIdx = 0; assignmentIdx < assignments.size(); assignmentIdx++)
	    constraint = constraint.insert(assignments.get(assignmentIdx));
	Solution solution = null; //constraint.getUniqueSolution();
	if (solution != null){
	    if (solution == Solution.NOSOLUTION)
		return new SingleConstraintSet(BooleanConstant.FALSE);
	    for (Variable variable: solution.variables()){
		Constant value = solution.getValue(variable);
		Assignment assignment = new Assignment(variable, value);
		constraint = constraint.insert(assignment);
		assignments.add(assignment);
	    }
	    uncheckedConstraints.addAll(checkedConstraints);
	    checkedConstraints.removeAllElements();
	}
	combineConditions(checkedConstraints, uncheckedConstraints, assignments, constraint);
    }
}

SingleConstraintSet result = new SingleConstraintSet();
for (int i = 0; i < checkedConstraints.size(); i++)
    result.add(checkedConstraints.get(i));
for (int i = 0; i < assignments.size(); i++)
    result.add(assignments.get(i));
return result;
   }
 
开发者ID:wwu-pi,项目名称:tap17-muggl-javaee,代码行数:44,代码来源:SimpleConstraintSetOptimizer.java


注:本文中的java.util.Vector.addAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。